mattantonelli / lodestone

Unofficial webhook service, REST API, and RSS feed for Final Fantasy XIV Lodestone news
https://lodestonenews.com
30 stars 8 forks source link

Handle 500 errors from webhook updates #4

Closed mattantonelli closed 6 years ago

mattantonelli commented 6 years ago

Very rarely a webhook update will fail to send, returning a 500 error. In a recent Lodestone update, this affected 18 out of 785 subscribers for the Updates category. The webhook URL, category, and update ID should be cached, and a process should be created to attempt to send the update again.

E, [2018-02-14T03:08:12.615249 #4096] ERROR -- : Failed to send "FINAL FANTASY XIV Updated (Feb. 13)" to https://discordapp.com/api/webhooks/ID/TOKEN - 500 Internal Server Error
E, [2018-02-14T03:08:12.615430 #4096] ERROR -- : {:date=>"Wed, 14 Feb 2018 08:08:12 GMT", :content_type=>"application/json", :content_length=>"52", :connection=>"keep-alive", :set_cookie=>["__cfduid=db263415aa90314b24ab94a48b37423271518595682; expires=Thu, 14-Feb-19 08:08:02 GMT; path=/; domain=.discordapp.com; HttpOnly"], :via=>"1.1 google", :alt_svc=>"clear", :expect_ct=>"max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", :server=>"cloudflare", :cf_ray=>"3ece898828221840-EWR"}
E, [2018-02-14T03:08:12.615583 #4096] ERROR -- : {"code": 0, "message": "500: Internal Server Error"}