Returns a JSON representation of ErrorDetails.
Map<String, dynamic> toJson() { return { 'RequestId': requestId, 'Date': date == null ? '' : date!.toUtc().toIso8601String() }; }