HttpStatusException constructor

HttpStatusException(
  1. int code, {
  2. dynamic message,
  3. String? errorCode,
  4. Map<String, String> headers = const <String, String>{},
})

Implementation

HttpStatusException(
  int code, {
  dynamic message,
  String? errorCode,
  this.headers = const <String, String>{},
}) {
  super.code = code;
  super.errorCode = errorCode ?? _errorCodes[code] ?? 'http_error';
  super.message = message ?? _messages[code] ?? 'Error';
}