Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
app-exception
Advanced tools
AppException is a small and easy-to-use HTTP error library for Node. It's an addition to HttpException
AppException improves HttpException work making easier to create errors with custom application codes.
import AppException from 'app-exception';
// via the AppException class. Parameters: message, application error code, http error code
const errorOne = new AppException('error message', 9, 500);
// via the createError factory
const errorTwo = AppException.createError();
// via AppException's static HTTP status-specific methods
throw AppException.internalServerError('test', 9);
throw AppException.badRequest('test', 9);
const app = express();
// other stuff
// after all your app.use
app.use(async function (err, req, res, next) {
if(err instanceof HttpException) {
return res.status(err.status).json(err);
}
// other error handling stuff
});
const app = express();
// first app.use
app.use(function (req, res, next) {
Response.response(res);
next();
});
message
{ String } error messagecode
{ String / Integer } application error codeReturns a new AppException object.
const error = AppException.badRequest({
message: 'No user found',
code: 9
})
throw error
message
{ String } error messagecode
{ String / Integer } application error codestatus
{ Integer } http error codeReturns a new AppException object.
throw new AppException('error', 9, 400)
options
{ Object }Return a new AppException object.
const error = AppException.createError({
message: 'No user found',
code: 9,
status: 400
})
throw error
For support and questions contact mail me at team@99xp.org
FAQs
A small and easy-to-use http errors library for Node
The npm package app-exception receives a total of 1 weekly downloads. As such, app-exception popularity was classified as not popular.
We found that app-exception demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.