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
In a CMS, there are several approaches to how requests are processed and responses to a request are sent, as well as how an error response is sent.
This mainly applies to AJAX requests. In some cases, a 403/404 error is sent directly depending on the request, but the error message itself is not sent. In other cases, we send status code 200 and an error directly in the body of the response, most often this is a response in graphQL format, where the error is part of the HTML fragment.
This also applies to queries that return a specific result but do not contain a message.
What is it for. Sometimes on the client side it is necessary to process the server message and provide the user with confirmation that the request was successful or display an error message.
There are probably components that still do not provide feedback to the user in the form of a toast message or any other message.
It is necessary to conduct a review and determine how the response to the request is sent. If it is possible to fix existing functionality, then perhaps it should be fixed. If this is not possible, then a specific approach to handling requests should be developed and used to ensure consistency in the response format, thereby allowing some functionality to be reused.
The text was updated successfully, but these errors were encountered:
That doc doesn't give too much guidance on the exact HTTP status codes, though that's because they're standard and there's plenty of other references that spell this out e.g. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
Description
In a CMS, there are several approaches to how requests are processed and responses to a request are sent, as well as how an error response is sent.
This mainly applies to AJAX requests. In some cases, a
403/404
error is sent directly depending on the request, but the error message itself is not sent. In other cases, we send status code200
and an error directly in the body of the response, most often this is a response in graphQL format, where the error is part of the HTML fragment.This also applies to queries that return a specific result but do not contain a message.
What is it for. Sometimes on the client side it is necessary to process the server message and provide the user with confirmation that the request was successful or display an error message.
There are probably components that still do not provide feedback to the user in the form of a toast message or any other message.
It is necessary to conduct a review and determine how the response to the request is sent. If it is possible to fix existing functionality, then perhaps it should be fixed. If this is not possible, then a specific approach to handling requests should be developed and used to ensure consistency in the response format, thereby allowing some functionality to be reused.
The text was updated successfully, but these errors were encountered: