Map<String, dynamic> toJson() => { 'statusCode': statusCode, 'status': status, 'error': error?.toJson(), };