AuthTestHttpResponse.error constructor

AuthTestHttpResponse.error(
  1. String code, {
  2. int statusCode = 400,
  3. String? message,
  4. Map<String, String> headers = const <String, String>{},
})

Creates the bounded public error shape consumed by AuthClientTransport.

Implementation

factory AuthTestHttpResponse.error(
  String code, {
  int statusCode = 400,
  String? message,
  Map<String, String> headers = const <String, String>{},
}) => AuthTestHttpResponse.json(
  <String, dynamic>{'error': code, 'message': ?message},
  statusCode: statusCode,
  headers: headers,
);