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
{{ message }}
Repository navigation
HTTP client does not handle problem+json error responses #1776
While reviewing the dataset migration, I found that HTTPClient does not handle the new server error format.
The server sends RFC 9457 problem responses as application/problem+json, with a string detail and an optional top-level code.
Currently:
application/problem+json is sent to the XML parser.
A JSON response with a string detail raises AttributeError, because the client expects detail to be a dictionary.
I reproduced this with a mocked missing-dataset response matching the server tests:
application/problem+json -> OpenMLServerError caused by ExpatError
application/json -> OpenMLServerError caused by AttributeError
This means the response code never reaches the existing exception mapping. For example, code 111 should reach OpenMLServerNoResult.
Could we recognize application/problem+json, read its top-level code and string detail, and keep the current XML and nested JSON formats working? I can take the small compatibility fix and add regression tests.
Related to #1491, which covers the broader exception work.
Activity