-
Notifications
You must be signed in to change notification settings - Fork 1
Throw a custom exception if calling provided transformer throws an exception #37
Throw a custom exception if calling provided transformer throws an exception #37
Conversation
| try { | ||
| result = transformer.transform(req.exceptionRecord); | ||
| } catch (Exception exc) { | ||
| throw new TransformationException("Error while calling provided transformer", exc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth phrasing it in such way that it's obvious that it's the transformer that threw the exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| try { | ||
| result = transformer.transform(req.exceptionRecord); | ||
| } catch (Exception exc) { | ||
| throw new TransformationException( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wondering what will caseworker see on the screen whole exception stack trace unless services implement an exception handler ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case of Spring Boot, it depends whether the default 500 response is something CCD will be able to 'parse'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, CCD displays a standard error message in such case.
No description provided.