mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Include actual exception message with custom exceptions
This commit is contained in:
@@ -32,7 +32,7 @@ module ActiveModelSerializers
|
||||
def call
|
||||
json_schema.expand_references!(store: document_store)
|
||||
status, errors = json_schema.validate(response_body)
|
||||
@message ||= errors.map(&:to_s).to_sentence
|
||||
@message = [message, errors.map(&:to_s).to_sentence].compact.join(': ')
|
||||
status
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user