Converts the error data back to JSON.
Map<String, dynamic> toJson() { return { 'errors': errors.map((e) => e.toJson()).toList(), }; }