mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-18 12:51:43 +00:00
Log response only if status code is not "201 Created"
This commit is contained in:
parent
049f9873af
commit
684c2048d7
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ module Agents
|
|||
mo = interpolated(event)
|
||||
begin
|
||||
response = HTTParty.post(endpoint_for(mo['type']), body: payload_for(mo), headers: headers)
|
||||
response.code == 201 ? log(response.body) : error(response.body)
|
||||
error(response.body) if response.code != 201
|
||||
rescue HTTParty::Error => e
|
||||
error(e.message)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue