RESTful-Drupal / restful

RESTful best practices for Drupal
https://drupal.org/project/restful
418 stars 173 forks source link

Consider using the IETF API-Problem specification for error messages #27

Closed cpliakas closed 10 years ago

cpliakas commented 10 years ago

Cool module.

One recommendation is to consider adopting the IETF API-Problem specification for error messages. There is a good blog post at https://www.mnot.net/blog/2013/05/15/http_problem that gives an overview of why this is useful, and there is some tooling in PHP at https://github.com/Crell/ApiProblem to help facilitate rendering spec-compliant messages.

Thanks! Chris

amitaibu commented 10 years ago

Hi @cpliakas - thanks for visiting! :)

I think adding a library for outputting the response is a bit of overkill right now, and maybe our current implementation is enough.

If you think I miss the point feel free to re-open.

cpliakas commented 10 years ago

Hi @amitaibu.

To clarify, I am advocating that this module adheres to the spec, I was simply pointing out that there is a library and don;t have much interest whether it is included in the module or not.

To be more specific, this module defines a custom error messaging format at https://github.com/Gizra/restful/blob/7.x-1.x/restful.module#L223. For DX it would be helpful if the output was something standard.

Thanks, Chris

amitaibu commented 10 years ago

Oh, ok, I now understand what you mean Care to give it a shot? :)

e0ipso commented 10 years ago

Please, move conversation to #49