getErrorMessage static method

String? getErrorMessage(
  1. Response response
)

Implementation

static String? getErrorMessage(http.Response response) {
  final statusCode = response.statusCode;
  final errorMessage = response.body;
  // debugPrint("HTTP Error: Status Code: $statusCode, Error Message: $errorMessage");
  return "Status Code: $statusCode, Error Message: $errorMessage";
}