Limiting the amount of logging produced in the event of an error