
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
json-api-error
Advanced tools
JSON API Errors is a collection of popular errors which is format under of JSON API Specification. More detailed in here
The easiest way to install json-api-error is using NPM. If you have Node.js installed, it is most likely that you have NPM installed as well.
$ npm install json-api-error
At the current implementation, json-api-error support the following common errors
BadRequestErrorUnauthorizedErrorForbiddenErrorNotFoundErrorMethodNotAllowedErrorNotAcceptableErrorRequestTimeoutErrorUnsupportedMediaTypeErrorInternalErrorNotImplementedErrorBadGatewayErrorServiceUnavailableErrorGatewayTimeoutErrorimport { BadRequestError } from 'json-api-error';
throw new BadRequestError('Request is invalid');
import { BadRequestError } from 'json-api-error';
throw new BadRequestError({
id: 'BadRequestError',
code: 'BadRequestError',
title: 'BadRequestError',
detail: 'The #/userName must be number'
}));
import { JsonApiError } from 'json-api-error';
throw new JsonApiError({
id: 'RequestEntityTooLargeError',
status: '413',
code: 'RequestEntityTooLargeError',
title: 'RequestEntityTooLargeError',
detail: 'Request Entity Too Large'
});
| Properties | Detail | Type | Default Value |
|---|---|---|---|
| id | a unique identifier for this particular occurrence of the problem | string | equal to error name |
| links | a links object, more detailed in here | object | N/A |
| status | the HTTP status code applicable to this problem, expressed as a string value | string | equal to HTTP code |
| code | an application-specific error code, expressed as a string value | string | equal to error name |
| title | a short, human-readable summary of the problem | string | equal to error name |
| detail | a human-readable explanation specific to this occurrence of the problem | string | equal to error name |
| source | an object containing references to the source of the error, more detailed in here | object | NA |
| meta | a meta object containing non-standard meta-information about the error. | object | NA |
FAQs
JSON API Errors
The npm package json-api-error receives a total of 1 weekly downloads. As such, json-api-error popularity was classified as not popular.
We found that json-api-error 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.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.