We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc7441e commit 975451fCopy full SHA for 975451f
lib/hub/github_api.rb
@@ -130,7 +130,12 @@ def error_sentences
130
data['errors'].map do |err|
131
case err['code']
132
when 'custom' then err['message']
133
- when 'missing_field' then "field '%s' is missing" % err['field']
+ when 'missing_field'
134
+ %(Missing field: "%s") % err['field']
135
+ when 'invalid'
136
+ %(Invalid value for "%s": "%s") % [ err['field'], err['value'] ]
137
+ when 'unauthorized'
138
+ %(Not allowed to change field "%s") % err['field']
139
end
140
end.compact if data['errors']
141
0 commit comments