One Logo Pool Ball
FoundationModels · IOS API REFERENCE

LanguageModelSession.GenerationError

enum · iOS 26.0+ · Deprecated in iOS 27.0 · SDK 27.1

enum GenerationError

An error that may occur while generating a response. @DeprecationSummary { Use ``LanguageModelError``, ``SystemLanguageModel/Error``, or ``LanguageModelSession/Error`` instead. Apps built with Xcode 26 will continue to catch this error until you rebuild with Xcode 27. You must update to Xcode 27 to catch the new error types before submitting your app. }

Members (3)

get · iOS 26.0+

failureReason

TypeScript
get failureReason(): (string) | null
Swift declaration
var failureReason: String? { get }

A string representation of the failure reason.

get · iOS 26.0+

errorDescription

TypeScript
get errorDescription(): (string) | null
Swift declaration
var errorDescription: String? { get }

A string representation of the error description.

get · iOS 26.0+

recoverySuggestion

TypeScript
get recoverySuggestion(): (string) | null
Swift declaration
var recoverySuggestion: String? { get }

A string representation of the recovery suggestion.

Skipped declarations

No declarations were skipped in this snapshot.

All FoundationModels types →