swagger1st icon indicating copy to clipboard operation
swagger1st copied to clipboard

Support application/problem+json

Open prayerslayer opened this issue 8 years ago • 3 comments

Currently api/throw-error yields the following json:

{
  "message": "Error",
  "details": {...}
}

It would be cool if this could be changed to the application/problem+json RFC. The function signature can easily be the same.

prayerslayer avatar Aug 24 '16 07:08 prayerslayer

@sebastianpoeplau and @harti2006, WDYT about @prayerslayer's suggestion?

lasomethingsomething avatar Dec 02 '16 18:12 lasomethingsomething

Sounds like a good idea to me.

sebastianpoeplau avatar Dec 05 '16 11:12 sebastianpoeplau

My impression is that the parser component shouldn't be responsible for generating HTTP responses. The parser should return the result of parsing which can be handled by an error handler down the chain. This way a user of s1st can optionally add a middleware down the chain to handle errors according to their specification.

marsmining avatar Dec 30 '16 14:12 marsmining