2

If I have a validation rule that prevents duplicate put requests on an entity , should I log this situation as a error or info in my logs? If I see a error connecting to DB or error calling an external api , I log these as errors. However I want to understand what is the best practice for logging a business error returned by an external api or validation error caught by my service.

Punter Vicky
  • 12,516
  • 39
  • 134
  • 241
  • I think the clue is in your text, you keep referring to them as `validation error` and `business error` so if you are calling/referring to them as errors then it seems appropriate to log them as errors. – Chris Doyle Dec 17 '19 at 19:59

0 Answers0