Skip to content

feat: changed accept pegin and pegout reponse status#631

Merged
gsoares85 merged 2 commits intoflyover-2.1.1from
hotfix/GBI-2503-changeStatusCode
Feb 17, 2025
Merged

feat: changed accept pegin and pegout reponse status#631
gsoares85 merged 2 commits intoflyover-2.1.1from
hotfix/GBI-2503-changeStatusCode

Conversation

@gsoares85
Copy link
Copy Markdown
Contributor

What

In accept pegin and pegout case the quote where not found or expired, will return instead of 400 status a 404 status and a message of quote not found for user.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 14, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

jsonErr := rest.NewErrorResponseWithDetails("invalid request", rest.DetailsFromError(err), true)
rest.JsonErrorResponse(w, http.StatusBadRequest, jsonErr)
jsonErr := rest.NewErrorResponseWithDetails("quote not found", rest.DetailsFromError(err), true)
rest.JsonErrorResponse(w, http.StatusNotFound, jsonErr)
Copy link
Copy Markdown
Collaborator

@Luisfc68 Luisfc68 Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will return 404 also when the quote is expired, shouldn't that scenario maintain the 400?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree to differentiate the error code

@gsoares85 gsoares85 requested a review from Luisfc68 February 14, 2025 16:34
@gsoares85 gsoares85 merged commit 44bc80b into flyover-2.1.1 Feb 17, 2025
5 checks passed
@gsoares85 gsoares85 deleted the hotfix/GBI-2503-changeStatusCode branch February 17, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants