forked from AlexBHarley/express-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adam Buczynski
committed
Jun 15, 2016
1 parent
5da5b05
commit a86517c
Showing
2 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
/** | ||
* Dependencies | ||
*/ | ||
let ClientError = require('../client'); | ||
|
||
/** | ||
* Constructor | ||
*/ | ||
function ExistsError(message, data) { | ||
message = message || 'Already exists'; | ||
ClientError.call(this, message, data, 400); | ||
} | ||
|
||
/** | ||
* Extend prototype | ||
*/ | ||
ExistsError.prototype = Object.create(ClientError.prototype); | ||
ExistsError.prototype.constructor = ExistsError; | ||
ExistsError.prototype.name = 'ExistsError'; | ||
ExistsError.prototype.code = 'EXISTS'; | ||
|
||
//Export | ||
module.exports = ExistsError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters