Skip to content

Commit 107b8a9

Browse files
authored
Merge pull request #138 from mizoR/fix-example
Fix wrong #error method usage
2 parents 0abce2f + 4146096 commit 107b8a9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/echobot/app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def client
1313

1414
signature = request.env['HTTP_X_LINE_SIGNATURE']
1515
unless client.validate_signature(body, signature)
16-
error 400 do 'Bad Request' end
16+
halt 400, {'Content-Type' => 'text/plain'}, 'Bad Request'
1717
end
1818

1919
events = client.parse_events_from(body)

examples/kitchensink/app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def reply_content(event, messages)
4040

4141
signature = request.env['HTTP_X_LINE_SIGNATURE']
4242
unless client.validate_signature(body, signature)
43-
error 400 do 'Bad Request' end
43+
halt 400, {'Content-Type' => 'text/plain'}, 'Bad Request'
4444
end
4545

4646
events = client.parse_events_from(body)

0 commit comments

Comments
 (0)