-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Use case
Sometimes, it's useful to detect and handle specific errors on the client side (e.g., TOO_MANY_SIMULTANEOUS_QUERIES
).
However, now Error::BadResponse
contains only String
, forcing users to use details.contains(code)
.
Describe the solution you'd like
Replace Error::BadResponse(String)
with Error::BadResponse(BadResponseDetails)
where BadResponseDetails
contains code
(numeric code), reason
(string like TOO_MANY_SIMULTANEOUS_QUERIES
) and message
(the current String
argument).
BadResponse
is also used for HTTP errors, so we need to decide what should be stored in code
and reason
in this case. Another way is to divide BadResponse
into two separate variants.
pravic, mshustov and aaronvg
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request