lib/error-handlers/object.js
function handleObjectAsError(err, errorMessage) {

  if (isPlainObject(err)) {

    extractFromObject(err, errorMessage);
  } else {

    handleUnknownAsError(err, errorMessage);
  }
}
function handleObjectAsError(err, errorMessage) {

  if (isPlainObject(err)) {

    extractFromObject(err, errorMessage);
  } else {

    handleUnknownAsError(err, errorMessage);
  }
}
function handleObjectAsError ( err , errorMessage ) { if ( isPlainObject ( err ) ) { extractFromObject ( err , errorMessage ) ; } else { handleUnknownAsError ( err , errorMessage ) ; } }
Handles routing and validation for parsing an error that has been indicated
to be of type object. If the value submitted for err passes a basic check
for being of type Object than the input will extracted as such, otherwise the
input will be treated as unknown.
@function handleObjectAsError
@param {Object} err - the error information object to extract from
@param {ErrorMessage} errorMessage - the error message instance to marshal
error information into
@returns {Undefined} - does not return anything
Handles routing and validation for parsing an error that has been indicated to be of type object . If the value submitted for err passes a basic check for being of type Object than the input will extracted as such otherwise the input will be treated as unknown .