Package Exports
- wp-error
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wp-error) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
wp-error
Common logic to process WordPress.com API responses into JS Error objects
Creates a JavaScript Error
instance, with properties copied over from
the given object, and HTTP response status interpreted.
Installation
Install wp-error
using npm
:
$ npm install --save wp-error
Examples
var err = new WPError({
error: 'processing_failed',
error_description: 'Invalid upload format',
);
err.toString();
// "ProcessingFailedError: Invalid upload format"
License
MIT – Copyright Automattic 2016