4finance / micro-infra-spring

Repository containing default microservice infrastructure set up using Spring configuration
Apache License 2.0
203 stars 49 forks source link

configurable logging or ServiceRestClient error responses #620

Closed RemboL closed 7 years ago

RemboL commented 7 years ago

Reasoning for this change is two-fold:

  1. in many situations, when using ServiceRestClient in catch clause usually first thing to do is log exception on error message - which in most cases just doubles the error message that was already logged by default ResponseRethrowingErrorHandler
  2. there are situations where receiving 4xx response is expected behaviour - in that case logging error message result in confusion, since developer seeing error message in logs might assumes that something broke

Not wanting to change the default behaviour of this handler I think it's best to make it configurable and let the developers decide.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 897c219d1ae476cfbb7a35b1d58c68a5cca1b8a9 on RemboL:master into on 4finance:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 2a0b21e432d6ff4e22d45af173906ffe3de78dad on RemboL:master into on 4finance:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling f4b22e43fc8d82e36d614d47c0aef655fb452d2a on RemboL:master into on 4finance:master.