How to use the UNAUTHORIZED function from http-status-codes
Find comprehensive JavaScript http-status-codes.UNAUTHORIZED code examples handpicked from public code repositorys.
GitHub: sugune/jobs
1 2 3 4 5 6 7 8 9 10 11 12
const StatusCodes = require('http-status-codes'); class UnauthenticatedError extends CustomApiError { constructor(message){ super(message); this.statusCode = StatusCodes.UNAUTHORIZED; } } module.exports = UnauthenticatedError;
0
0
0
http-status-codes.StatusCodes is the most popular function in http-status-codes (2750 examples)