Skip to content

Conversation

@domibay-hugo
Copy link
Owner

new method to return formatted JSON Responses for 400 Bad Request Responses

domibay-hugo and others added 30 commits July 9, 2021 10:18
Bad Request Dispatch Method to return a JSON Response
format the exception message and dispatch it through the bad_request() Method
If there is an error while deserializing, it is nicer to respond with a
JSON response, rather than plain text. Use a custom Deserialize action
class, which puts the error into the stash where either the Serialize
action class or the JSON view expects. And then skip the rest of the
request.
Reimport Official Solution for "deserialize errors as json"
…o domibay-hugo/no-1029_bad-request-json

Re-import official solution
https://github.com/domibay-hugo/metacpan-api.git into
domibay-hugo/no-1029_bad-request-json

Conflicts:
	lib/MetaCPAN/Server/Action/Deserialize.pm
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