fawwazF
Convex Communityโ€ข3y agoโ€ข
14 replies
fawwaz

Trying to implement 404 but getting validator error

Hello all ๐Ÿ‘‹ , in my app the ID for a resource ("campaign") is taken from the url, most the time things works as expected. However, if the user try to input the url and have typo or hit a deleted resource, In stead of seeing a 404 or my error page, the app crashes with this error. I tried adding .catch to the db.get call but it seems that the error is coming from the validator. is there is away to return null when campaign with the id provided does not exist?
image.png
image.png
Was this page helpful?