-
Notifications
You must be signed in to change notification settings - Fork 220
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
Error code when RUCSS API can't be reached #6289
Comments
Root causeThe root cause is due to the fact WordPress returning an empty response when not reaching the endpoint. Scope a solutionA simple solution would be to add a default error message when we are getting a empty result at this level inside the client. Estimate effortEffort |
@CrochetFeve0251 Sounds good for the error message. About the error code, it is handled just above it seems:
What I am afraid of is that sometime, the HTTP Response code returned here could match one of the code we use within the payload. For instance, the HTTP Response code could be 408 because of API timeout. We would store a error_code 408 in the RUCSS DB and trigger the retry mechanism, which is not what we want. To make sure we don't have conflict, WDYT of something like:
This would avoid collision on "code" stored in the RUCSS DB + to keep the complete information for debug purposes. |
After discussion with @CrochetFeve0251, we will keep this fix here very simple and not tackle the HTTP code / RUCSS code collision in this issue. As a result, the proposed solution is OK. |
Context
Related to this GH issue: #6222
QA team notices that part of the specification was missing in this thread: if the API can't be reached (not responding, timeout, ...) and that we don't have an HTTP answer, it is not clear how the plugin behaves. For instance, see this possible issue.
This means that we don't know exactly what happens in case the API can't be reached and we would not be able to identify the issue when debugging a user for instance.
Expected behavior
As mentioned in this GH issue, we would need a specific error_code and/or error_message to be stored into the RUCSS table in the DB, in case the API can't be reached.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: