This feels kinda flakey.  Elsewhere we usually rely on `err.name` instead of `err.message`, and we have a dedicated error in `errors.js`.  Also, this won't work for websql, see above.