You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding documentation for the API would help development and testing of its consumers, most notably the Signal Stickers website. The primary driver of this request is to better handle errors returned by the API. Specifically, what HTTP status codes each route/method can return, and the expected error payload for each. It looks like in most cases we use a payload like:
{
"error": "This is an API error message."
}
However, knowing when to expect a JSON payload with an error for a non-200 response would make error-handling code on the front-end easier to manage.
Additionally, having documentation would let us write type definitions for expected request and response payloads so that our API interactions are fully type-safe.
The text was updated successfully, but these errors were encountered:
Adding documentation for the API would help development and testing of its consumers, most notably the Signal Stickers website. The primary driver of this request is to better handle errors returned by the API. Specifically, what HTTP status codes each route/method can return, and the expected error payload for each. It looks like in most cases we use a payload like:
However, knowing when to expect a JSON payload with an error for a non-200 response would make error-handling code on the front-end easier to manage.
Additionally, having documentation would let us write type definitions for expected request and response payloads so that our API interactions are fully type-safe.
The text was updated successfully, but these errors were encountered: