|
2 | 2 |
|
3 | 3 | from typing import List, Optional |
4 | 4 | from datetime import datetime |
5 | | -from typing_extensions import Literal |
6 | 5 |
|
7 | 6 | from ..scope import Scope |
8 | 7 | from ..._models import BaseModel |
9 | 8 | from .run_state import RunState |
| 9 | +from ..error_code import ErrorCode |
10 | 10 | from ..user_profile import UserProfile |
11 | 11 | from .artifact_item import ArtifactItem |
12 | 12 | from .run_source_type import RunSourceType |
@@ -69,26 +69,7 @@ class StatusMessage(BaseModel): |
69 | 69 | message: str |
70 | 70 | """Human-readable status message""" |
71 | 71 |
|
72 | | - error_code: Optional[ |
73 | | - Literal[ |
74 | | - "insufficient_credits", |
75 | | - "feature_not_available", |
76 | | - "external_authentication_required", |
77 | | - "not_authorized", |
78 | | - "invalid_request", |
79 | | - "resource_not_found", |
80 | | - "budget_exceeded", |
81 | | - "integration_disabled", |
82 | | - "integration_not_configured", |
83 | | - "operation_not_supported", |
84 | | - "environment_setup_failed", |
85 | | - "content_policy_violation", |
86 | | - "conflict", |
87 | | - "authentication_required", |
88 | | - "resource_unavailable", |
89 | | - "internal_error", |
90 | | - ] |
91 | | - ] = None |
| 72 | + error_code: Optional[ErrorCode] = None |
92 | 73 | """ |
93 | 74 | Machine-readable error code identifying the problem type. Used in the `type` URI |
94 | 75 | of Error responses and in the `error_code` field of RunStatusMessage. |
|
0 commit comments