16 lines
554 B
Go
16 lines
554 B
Go
package generation
|
|
|
|
// ProviderFailure crosses the synthesis port without retaining provider payloads.
|
|
// Only these stable codes may enter the persisted outcome.
|
|
type ProviderFailure string
|
|
|
|
func (e ProviderFailure) Error() string { return e.FailureCode() }
|
|
func (e ProviderFailure) FailureCode() string {
|
|
switch string(e) {
|
|
case "summary_model_rejected", "summary_provider_limit", "summary_auth_failed", "summary_rate_limited", "summary_unavailable", "summary_timeout", "summary_canceled":
|
|
return string(e)
|
|
default:
|
|
return "summary_failed"
|
|
}
|
|
}
|