ApiException.from constructor

ApiException.from(
  1. dynamic error
)

Implementation

factory ApiException.from(dynamic error) {
  if (error is ApiException) return error;

  return ApiException(message: error.toString(), originalError: error);
}