Skip to content

Commit b413582

Browse files
committed
Add @payload[:errors] to error.json.jbuilder
- Remove payload[:message], copying v1 behaviour
1 parent 6d8550e commit b413582

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎app/views/api/v2/error.json.jbuilder‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
json.partial! 'api/v2/standard_response'
44

55
# json.items []
6-
json.message @payload[:message]
6+
json.errors @payload[:errors]
77
json.details @payload[:details]

‎spec/views/api/v2/error.json.jbuilder_spec.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
end
2424

2525
it ':errors contains an array of error messages' do
26-
expect(@json[:message]).to eql(@errors)
26+
expect(@json[:errors]).to eql(@errors)
2727
end
2828
end
2929
end

0 commit comments

Comments
 (0)