# fromErrorResponse static method

NativeException fromErrorResponse(

1. ErrorResponse? errorResponse

)

## Implementation

    static NativeException fromErrorResponse(ErrorResponse? errorResponse) {
      if (errorResponse == null) {
        return NativeException(error: "Native exception from Error Response, but errorResponse is null");
      }
      if (errorResponse.throwable != null) {
        return NativeException(error: "Native exception from Error Response with throwable.\nmessage: ${errorResponse.throwable?.message}\nthrowable: ${errorResponse.throwable?.throwable.toString()}\napiErrorId: ${errorResponse.apiError?.errorId}\napiErrorItems: ${errorResponse.apiError?.errors?.join(",")}");
      }
      return NativeException(error: "Native Exception from Error Response without throwable.\napiErrorId: ${errorResponse.apiError?.errorId}\napiErrorItems: ${errorResponse.apiError?.errors?.join(",")}");
    }