forked from persvr/perstore
-
Notifications
You must be signed in to change notification settings - Fork 4
/
errors.js
17 lines (11 loc) · 846 Bytes
/
errors.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var ErrorConstructor = require("./util/extend-error").ErrorConstructor;
var AccessError = exports.AccessError = ErrorConstructor("AccessError");
var MethodNotAllowedError = exports.MethodNotAllowedError = ErrorConstructor("MethodNotAllowedError", AccessError);
var DatabaseError = exports.DatabaseError = ErrorConstructor("DatabaseError");
var NotFoundError = exports.NotFoundError = ErrorConstructor("NotFoundError", DatabaseError);
NotFoundError.prototype.code = 2;
var PreconditionFailed = exports.PreconditionFailed = ErrorConstructor("PreconditionFailed", DatabaseError);
PreconditionFailed.prototype.code = 3;
var DuplicateEntryError = exports.DuplicateEntryError = ErrorConstructor("DuplicateEntryError", DatabaseError);
DuplicateEntryError.prototype.code = 4;
var AcceptError = exports.AcceptError = ErrorConstructor("AcceptError");