Skip to content

Commit 70400b2

Browse files
committed
Use success? method instead of checking status
1 parent 7fe2b19 commit 70400b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/qiita.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def publish
3737
connection.patch(&request_params)
3838
end
3939

40-
unless response.status >= 200 && response.status < 300
40+
unless response.success?
4141
raise QiitaAPIError.new(
4242
data: {
4343
response: response,

0 commit comments

Comments
 (0)