shopinvader / locomotive-shopinvader

LocomotiveCMS Plugin for Shopinvader
https://shopinvader.com
MIT License
12 stars 15 forks source link

Logging stack trace in case of "Erp under maintenance error" #61

Open sbidoul opened 4 years ago

sbidoul commented 4 years ago

When Locomotive cannot reach Odoo, an error is logged but no context is provided:

https://github.com/shopinvader/locomotive-shopinvader/blob/4c1baa66d702b22c3b14dbe8110770f3dc10134a/lib/shop_invader/services/erp_service.rb#L221-L223

This error can arise for a number of reasons (bad URL, api key as integer instead of string, etc). These are very hard to diagnose. Is it possible to log a stack trace in that case?

Not sure how to do that in ruby @sebastienbeau

sbidoul commented 4 years ago

cc/ @Laurent-Corron

sbidoul commented 4 years ago

cc/ @lmignon