I am trying to get a custom error message. Below I have mentioned the schema I have used. I am getting the Error Response as mentioned in my message, but the path is not present. I am attaching the error messages with and without the message block.
My Intended format for message has the path of error along with the custom message.
I am trying to get a custom error message. Below I have mentioned the schema I have used. I am getting the Error Response as mentioned in my message, but the path is not present. I am attaching the error messages with and without the message block.
My Intended format for message has the path of error along with the custom message.
Example Schema:
Error with the message block:
Error without the message block:
Error message that is expected
Is there a way to achieve the above error messaging?