toJson method

Map toJson()

Implementation

Map toJson() {
  return {
    'is_error': true,
    'status_code': statusCode,
    'message': message,
    // A copy, so changing the map does not change this exception.
    'errors': List.of(errors),
  };
}