Closed sergey-litvinov-work closed 7 years ago
@joukevandermaas added two more integration tests. One of them is for case when we return just one http error instead of list of errors, and another one when invalid operation exception happens.
Perfect! Thanks!
I will publish a new pre-release with these changes.
Thanks!
Hi,
We have a case when we need to return list of errors. Like if we do some internal validation and there are more than one error, then we need to return all of them. But right now Saule supports just one HttpError to be returned.
As i see in the JsonApi spec - http://jsonapi.org/format/#errors - it supports multiply errors in the response. So i did this change and pull request.
I updated
PreprocessResult
to haveList<ApiError>
instead of just oneApiError
and updated code to work with list of errors. Also added integration test and unit test forErrorSerializer
.Could you please review when you have time? Thanks