-
Notifications
You must be signed in to change notification settings - Fork 0
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
POST Forms Messages and Validations #70
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@MatiasComercio was assigned to see the examples and to read known issues that are independent of the Front End and will crash against them. |
MatiasMercado
requested changes
Feb 1, 2017
.append("\n"); | ||
} | ||
responseEntity.append("] }"); | ||
return Response.ok().status(Response.Status.BAD_REQUEST).entity(responseEntity.toString()).build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the Response build with ok()?
gibarsin
force-pushed
the
formsAndExceptions
branch
from
February 2, 2017 21:37
937f92e
to
9b43a84
Compare
- return errors in forms with invalid constraints (via POST calls to the API) as a JSON body with the errors mapped as "field":"message" - return a 400 Bad Request code in case a field in the Path Params and the Query Params (via GET calls to the API) instead of returning a 500 Internal Server Error with a 404 Not found body message - return a 400 Bad Request code in forms with invalid constraints instead of a 500 Internal Server Error - added custom (spanish) messages for constraints validation errors
gibarsin
force-pushed
the
formsAndExceptions
branch
from
February 2, 2017 21:48
9b43a84
to
2816c41
Compare
@MatiasMercado changes requested have been made. Accept the PR |
MatiasMercado
approved these changes
Feb 2, 2017
Merged
MatiasComercio
pushed a commit
that referenced
this pull request
Feb 5, 2017
- return errors in forms with invalid constraints (via POST calls to the API) as a JSON body with the errors mapped as "field":"message" - return a 400 Bad Request code in case a field in the Path Params and the Query Params (via GET calls to the API) instead of returning a 500 Internal Server Error with a 404 Not found body message - return a 400 Bad Request code in forms with invalid constraints instead of a 500 Internal Server Error - added custom (spanish) messages for constraints validation errors
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Examples
In case a POST request to /api/v1/students is made with the following JSON:
The JSON body returned will be:
Known Issues
For example, if a GET request to /api/v1/students?docket=0 is made, the JSON returned is:
Trello Card
https://trello.com/c/gx6o7nwX/14-manejo-de-errores-de-form-y-excepciones