Skip to content

Commit d2853bf

Browse files
authored
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.
1 parent 5210f3d commit d2853bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/handling-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class IssuesController < ApplicationController
5858
# errors object will report these.
5959
elsif response.errors.any?
6060
# "Could not resolve to a node with the global id of 'abc'"
61-
message = response.data.errors[:issue].join(", ")
61+
message = response.errors[:issue].join(", ")
6262
render status: :internal_server_error, plain: message
6363
end
6464
end

0 commit comments

Comments
 (0)