You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following custom type that raises an error:
conststringToObjectId=type('string>0').pipe.try((input,ctx)=>{if(typeofinput==='string'&&input.length<24){// whether ctx.reject or ctx.errorreturnctx.reject({message: "A message from this type"})}// ... other code here
I then use that type:
constschema_in=type({order_id: objectId.configure({message: "Invalid order id"})})
How do I get the error message "Invalid order id" to show when any error happens inside of the .pipe() ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following custom type that raises an error:
I then use that type:
How do I get the error message "Invalid order id" to show when any error happens inside of the .pipe() ?
Beta Was this translation helpful? Give feedback.
All reactions