Operation don't return errors
Closed this issue · 4 comments
ASnow commented
There is some stub that overwrite concept.errors
:
https://github.com/trailblazer/trailblazer-rails/blob/master/lib/trailblazer/operation/responder.rb#L15
apotonick commented
Yeah, we were talking about it a few days ago - do you want to replace it with operation.errors
(incl. a test)? 😬
ASnow commented
Yes. operation.errors
will be nice. Default HAL responder just return json with: {errors: [1]}
. It's real pain for development env and break some error handling logics for production.
v-kolesnikov commented
How can I work around this issue now? This really upsets me when I am so close to building a good api using a trailblazer.
apotonick commented
Haha, it's basically
def errors
contract.errors
end
I will push it later.