"\n" in errors message?
opened this issue · comments
Deleted user commented
With this:
rescue_from ActiveRecord::RecordInvalid do |exception|
GraphQL::ExecutionError.new(exception.record.errors.full_messages.join("\n"))
end
I get this:
{
"data": {
"createUser": null
},
"errors": [
{
"message": "Email is invalid\nEmail can't be blank",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"createUser"
]
}
]
}
with "\n" in error message. Is this ok?
exAspArk commented
Yeah, it might be a ,
or ;
instead of \n
, for example.
Feel free to open a PR to change it if you'd like :)