How to override the exception message for the @JsonSubType ? #162
Unanswered
Hardik-Parikh
asked this question in
Q&A
Replies: 1 comment
-
There are no ways to customize error messages in Jackson. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to achieve the polymorphism in json using jackson and for that I have used the
@JsonSubTypes
annotation providing appropriate list of@JsonSubType
Following error message is thrown when type is not found:
Following is the DTO:
Is there a way to override the error message when object of Details object has
productName
set to foo ?PS: Details is the abstract class and there are concrete class extended from it.
Beta Was this translation helpful? Give feedback.
All reactions