Log level for a business validation error

266 Views Asked by At

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.

0

There are 0 best solutions below