Last active
July 4, 2020 16:14
-
-
Save 5t33/a0a32ac165b70c5f01c7fc80d9cdc4f6 to your computer and use it in GitHub Desktop.
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
const { ApiError } = require('./utils'); | |
module.exports.functionThatRejectsWith400 = () => Promise.reject( | |
new ApiError(400, [ | |
"wow you messed up, huh?", | |
"Looks like somebody didn't read the documentation." | |
]) | |
) | |
module.exports.functionThatRejects = () => Promise.reject(new Error("Oh No")) | |
module.exports.functionThatResolves = () => Promise.resolve({so: "much", data: "wow"}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment