Namespace: nrpError
¶
Member Of Module: nrp-error
Description¶
nrpError
provides helper functions that all return an
nrpError
instance given a context object.
Function: error
¶
Build a nrpError
instance from the provided options.
param {Object} options argument passed to
nrpError
constructorreturn {nrpError} the resulting error
-
error
(options)¶ - Arguments
options (object) – [description]
- Return object
[description]
Function: httpError
¶
return a nrpError instance built from a HTTP response.
In an ideal case, the response contains json data with an error object. It also fallback to a reason field and fill default error message for standard HTTP status error.
-
httpError
(response)¶ - Arguments
response (HttpResponse) – Angular $http Response object
- Return nrpError
a valid nrpError