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
Stop the solver. Change the status code in the user header check to http.StatusInternalServerError.
Run the resource provider again and it will not fail with the invalid character error. Instead, it will retry attempts to contact the solver and eventually fail when the max retries are reached.
You may also want to reduce the number of retries to speed up the process:
While investigating our error handling, I uncovered an issue reporting
HTTPError
s in response to posts to the solver.Our
HTTPError
is defined here:lilypad/pkg/http/utils.go
Lines 41 to 44 in d30b6d8
It's a wrapper around an error message that let's us add a status code.
When handling a POST, a handler may return an
HTTPError
or a plainerror
:lilypad/pkg/http/utils.go
Lines 246 to 257 in d30b6d8
When using an
HTTPError
, we take the provided status code or otherwise report a 500http.StatusInternalServerError
status code.The set up for triggering this error is a bit contrived, but likely reveals an underlying issue where we will fail to correctly report errors.
Start the chain and solver. Comment out the line of code where we add a user header in our clients:
lilypad/pkg/http/utils.go
Line 106 in d30b6d8
Start a resource provider. It should immediately fail with this error:
We handle this error when we check for the user header in the solver:
lilypad/pkg/http/utils.go
Lines 118 to 124 in d30b6d8
Stop the solver. Change the status code in the user header check to
http.StatusInternalServerError
.Run the resource provider again and it will not fail with the invalid character error. Instead, it will retry attempts to contact the solver and eventually fail when the max retries are reached.
You may also want to reduce the number of retries to speed up the process:
lilypad/pkg/http/utils.go
Line 415 in d30b6d8
The text was updated successfully, but these errors were encountered: