How would you distinguish these types of "errors" from regular errors like a server 500 response?

How would you distinguish these types of "errors" from regular errors like a server 500 response?

Play all audios:

Loading...

How would you distinguish these types of "errors" from regular errors like a server 500 response? For example, if you wrap the asyncPipe in a try/catch to log any errors that happen like so: try { asyncPipe(...); } catch (err) { log(err); } I feel like the error logging should be reserved for actual errors in I/O, and not errors that are just being used for logic. Would you just have some checks in the catch to see which errors are real from I/O and ignore others?

How would you distinguish these types of "errors" from regular errors like a server 500 response? For example, if you wrap the asyncPipe in a try/catch to log any errors that


happen like so: try { asyncPipe(...); } catch (err) { log(err); } I feel like the error logging should be reserved for actual errors in I/O, and not errors that are just being used for


logic. Would you just have some checks in the catch to see which errors are real from I/O and ignore others?