Skip to content

Error responses should return error details, not just a single top-level error message #452

Description

@GoodGuyGoose

Problem

Failures only return a single error (often selected using an alt). Callers lose the full failure context and debugging becomes more challenging if we don't have the option include both an error and details.

Current shape

{
  "error": "Server returned 500 for https://whatever.example/ProductService.asmx"
}

Proposed shape

errorDetails (or other name) could be an array or string, can discuss

{
  "error": "Server returned 500 for https://whatever.example/ProductService.asmx",
  "errorDetails": [
    {
      "message": "Unable to handle request without a valid action parameter. Please supply a valid soap action.",
      "source": "soap"
    },
    {
      "message": "GET 'product' responded with error. Server returned 500 for https://whatever.example/ProductService.asmx",
      "source": "http",
      "statusCode": 500
    }
  ]
}

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions