Skip to content

Conversation

@agrim-rai
Copy link

Adds JSON error responses for API v1 endpoints. When clients request /api_new/v1/json/*, errors now return JSON instead of XML.

Solves #1200
Before :
image
After :
image

Changes

  • Added openml_OS/views/pages/api_new/v1/json/error-message.tpl.php to provide consistent JSON-formatted error responses.
  • New JSON error schema:
    {
      "error": {
        "code": "<code>",
        "message": "<message>",
        "additional_information": "<info>"
      }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant