File tree Expand file tree Collapse file tree
hystrix-core/src/main/java/com/netflix/hystrix Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1306,6 +1306,17 @@ private R executeCommand() {
13061306 logger .warn ("Error calling ExecutionHook.onRunError" , hookException );
13071307 }
13081308
1309+ try {
1310+ Exception decorated = executionHook .onError (this , FailureType .BAD_REQUEST_EXCEPTION , e );
1311+ if (decorated instanceof HystrixBadRequestException ) {
1312+ e = (HystrixBadRequestException ) decorated ;
1313+ } else {
1314+ logger .warn ("ExecutionHook.onError returned an exception that was not an instance of HystrixBadRequestException so will be ignored." , decorated );
1315+ }
1316+ } catch (Exception hookException ) {
1317+ logger .warn ("Error calling ExecutionHook.onError" , hookException );
1318+ }
1319+
13091320 /*
13101321 * HystrixBadRequestException is treated differently and allowed to propagate without any stats tracking or fallback logic
13111322 */
You can’t perform that action at this time.
0 commit comments