Make returned API errors more consistent

This commit is contained in:
Maciej Szlosarczyk 2018-08-07 15:04:37 +03:00
parent de9b1517b0
commit 0798001725
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
2 changed files with 4 additions and 4 deletions

View file

@ -31,7 +31,7 @@ module Api
if @contact
render json: @contact
else
render json: { errors: ['Contact not found'] }, status: :not_found
render json: { errors: [{ base: ['Contact not found'] }] }, status: :not_found
end
end