blob: cb2649ce868befd5c9aa206f556735af46525463 [file] [log] [blame]
class QueryParseError extends Error {
constructor(message) {
super();
this.status = 400;
this.name = 'query_parse_error';
this.message = message;
this.error = true;
try {
Error.captureStackTrace(this, QueryParseError);
} catch (e) {}
}
}
class NotFoundError extends Error {
constructor(message) {
super();
this.status = 404;
this.name = 'not_found';
this.message = message;
this.error = true;
try {
Error.captureStackTrace(this, NotFoundError);
} catch (e) {}
}
}
class BuiltInError extends Error {
constructor(message) {
super();
this.status = 500;
this.name = 'invalid_value';
this.message = message;
this.error = true;
try {
Error.captureStackTrace(this, BuiltInError);
} catch (e) {}
}
}
export {
QueryParseError,
NotFoundError,
BuiltInError
};