Fix error handling logic in example
We only get to this line if response.data is nil, and the condition indicates response.errors was supposed to be referenced.
This commit is contained in:
Родитель
5210f3d837
Коммит
d2853bf8c9
|
@ -58,7 +58,7 @@ class IssuesController < ApplicationController
|
|||
# errors object will report these.
|
||||
elsif response.errors.any?
|
||||
# "Could not resolve to a node with the global id of 'abc'"
|
||||
message = response.data.errors[:issue].join(", ")
|
||||
message = response.errors[:issue].join(", ")
|
||||
render status: :internal_server_error, plain: message
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче