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
Problem I'm facing is that thrown errors are "converted" back to Error and error instanceof HttpError returns false. Is this expected behaviour? I'm throwing them like throw new HttpError(401, 'You are not logged in!');
The text was updated successfully, but these errors were encountered:
It's fairly common to throw objects inherited from Error, such as this:
and then use middleware to capture and log these errrors and provide user friendly response:
Problem I'm facing is that thrown errors are "converted" back to Error and
error instanceof HttpError
returns false. Is this expected behaviour? I'm throwing them likethrow new HttpError(401, 'You are not logged in!');
The text was updated successfully, but these errors were encountered: