| import inherits from 'inherits'; |
| |
| function QueryParseError(message) { |
| this.status = 400; |
| this.name = 'query_parse_error'; |
| this.message = message; |
| this.error = true; |
| try { |
| Error.captureStackTrace(this, QueryParseError); |
| } catch (e) {} |
| } |
| |
| inherits(QueryParseError, Error); |
| |
| function NotFoundError(message) { |
| this.status = 404; |
| this.name = 'not_found'; |
| this.message = message; |
| this.error = true; |
| try { |
| Error.captureStackTrace(this, NotFoundError); |
| } catch (e) {} |
| } |
| |
| inherits(NotFoundError, Error); |
| |
| function BuiltInError(message) { |
| this.status = 500; |
| this.name = 'invalid_value'; |
| this.message = message; |
| this.error = true; |
| try { |
| Error.captureStackTrace(this, BuiltInError); |
| } catch (e) {} |
| } |
| |
| inherits(BuiltInError, Error); |
| |
| export { |
| QueryParseError, |
| NotFoundError, |
| BuiltInError |
| }; |