-
Notifications
You must be signed in to change notification settings - Fork 245
Closed
Labels
AgencySpecific to the Agency APISpecific to the Agency APIduplicateThis issue or pull request already existsThis issue or pull request already exists
Milestone
Description
The current version of the specification (https://github.com/CityOfLosAngeles/mobility-data-specification/blob/e2faabf5a7e59f4ec4422a1e0c8c4e66361547cc/agency/README.md) is not very clear about what the structure of the response body should be in case of an error.
It looks like the "message" enum are http status code ? If it is the case, using custom http status code should be avoided (especially using 3xx codes for client errors)
2 examples of good responses body in case of error:
- How Oauth2 does it: https://tools.ietf.org/html/rfc6749
{ "error": "my_error_code", "error_description": "human readable message" } - How a Kafka subsystem does it (add 2 digits to http status codes): https://github.com/confluentinc/kafka-rest/blob/master/docs/api.rst#errors
{"error_code": "40401", "message": "human readable message"}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
AgencySpecific to the Agency APISpecific to the Agency APIduplicateThis issue or pull request already existsThis issue or pull request already exists