I'm trying to handle Postgres error. If user sends invalid uuid - Postgres returns an error with message: pq: invalid input syntax for type uuid:...
So, i want to check that error and if the error equals to the invalid input syntax error - i would like to show to the client 404 error, rather than returning server error.
But i can't find the defined error type for the returned error in Postgres library...
Can someone suggest me, where is the error returned?
0 Replies