diff options
author | aravind.est <aravindhan.a@est.tech> | 2023-02-27 13:50:09 +0000 |
---|---|---|
committer | aravind.est <aravindhan.a@est.tech> | 2023-02-27 13:50:09 +0000 |
commit | e297b91468a465cf828f3a95d0e17fdd1ee89887 (patch) | |
tree | 0950831042f41bb27a32f09dee5aa10bc419a0bb /participant | |
parent | f12d441b34bee2e7f5c2488ed05c4abf0f86ba7a (diff) |
Fix sonar issue
Fixed issue with InterruptedException
Issue-ID: POLICY-4525
Signed-off-by: aravind.est <aravindhan.a@est.tech>
Change-Id: I9212469f0b695fea5907dacf185df8f5e77e7fee
Diffstat (limited to 'participant')
-rwxr-xr-x | participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/handler/AutomationCompositionElementHandler.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/handler/AutomationCompositionElementHandler.java b/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/handler/AutomationCompositionElementHandler.java index cae70565f..07fbce80c 100755 --- a/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/handler/AutomationCompositionElementHandler.java +++ b/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/handler/AutomationCompositionElementHandler.java @@ -138,10 +138,13 @@ public class AutomationCompositionElementHandler implements AutomationCompositio LOGGER.error("Violations found in the config request parameters: {}", violations); throw new ValidationException("Constraint violations in the config request"); } - } catch (ValidationException | ExecutionException | InterruptedException | CoderException e) { - throw new KserveException(HttpStatus.SC_BAD_REQUEST, "Invalid Configuration", e); - } catch (IOException | ApiException e) { - throw new KserveException(HttpStatus.SC_BAD_REQUEST, "Failed to configure the inference service", e); + } catch (CoderException e) { + throw new KserveException(HttpStatus.SC_BAD_REQUEST, "Invalid inference service configuration", e); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new KserveException("Interrupt in configuring the inference service", e); + } catch (IOException | ExecutionException | ApiException e) { + throw new KserveException("Failed to configure the inference service", e); } } |