Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] align the JSON deserialization errors into expected ErrorResponse format #6609

Closed
2 tasks done
kashif-m opened this issue Nov 19, 2024 · 0 comments · Fixed by #6610
Closed
2 tasks done

[FEATURE] align the JSON deserialization errors into expected ErrorResponse format #6609

kashif-m opened this issue Nov 19, 2024 · 0 comments · Fixed by #6610
Assignees
Labels
C-feature Category: Feature request or enhancement S-awaiting-triage Status: New issues that have not been assessed yet

Comments

@kashif-m
Copy link
Contributor

kashif-m commented Nov 19, 2024

Feature Description

HyperSwitch uses an error format for responding back with the errors in the API. This error structure is uniform across different stages of the flow. For any deserialization errors in the API, error response with a different structure is returned.

Expected

{
    "error": {
        "error_type": "invalid_request",
        "message": "Json deserialize error: unknown variant `automatiac`, expected one of `automatic`, `manual`, `manual_multiple`, `scheduled` at line 5 column 34",
        "code": "IR_06"
    }
}

Actual

{
    "error": "Json deserialize error: unknown variant `automatiac`, expected one of `automatic`, `manual`, `manual_multiple`, `scheduled` at line 5 column 34"
}

Possible Implementation

Update the Display implementation of CustomJsonError

Have you spent some time checking if this feature request has been raised before?

  • I checked and didn't find a similar issue

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

Yes, I am willing to submit a PR!

@kashif-m kashif-m added C-feature Category: Feature request or enhancement S-awaiting-triage Status: New issues that have not been assessed yet labels Nov 19, 2024
@kashif-m kashif-m self-assigned this Nov 19, 2024
@kashif-m kashif-m linked a pull request Nov 19, 2024 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: Feature request or enhancement S-awaiting-triage Status: New issues that have not been assessed yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant