getDetails method

String getDetails()

Get the error details

Implementation

String getDetails() {
  if (response != null) {
    ApiError? err = response!.error;
    StringBuffer sb = StringBuffer();

    sb.write('${err.code}: ');

    sb.write(err.message);

    if (err.description != null) {
      sb.write(err.description);
    }
    return sb.toString();
  }

  return '';
}