handleError abstract method

ErrorDetail handleError(
  1. String errorId,
  2. ErrorDetail error
)
inherited

Returns the ErrorDetail after manipulating an existing one.

Method that handles errors by parsing the raw response or custom input.

If other errors are to be added, then they will be handled here as if-else or switch-case.

Each error needs to be supplied an errorId, or null if a Generic Error were to be returned.

If error is passed, it can be manipulated within this method and return the modified ErrorDetail object.

Implementation

ErrorDetail handleError(String errorId, ErrorDetail error);