Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clients/go/ahptypes/state.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -2267,6 +2267,10 @@ type ErrorInfo struct {
Message string `json:"message"`
// Stack trace
Stack *string `json:"stack,omitempty"`
// Additional provider-specific metadata for this error.
// Clients MAY look for well-known optional keys here to provide enhanced UI
// (e.g. a structured chat fetch error for richer, localized messaging).
Meta map[string]json.RawMessage `json:"_meta,omitempty"`
}

// A point-in-time snapshot of a subscribed resource's state, returned by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3193,7 +3193,14 @@ data class ErrorInfo(
/**
* Stack trace
*/
val stack: String? = null
val stack: String? = null,
/**
* Additional provider-specific metadata for this error.
* Clients MAY look for well-known optional keys here to provide enhanced UI
* (e.g. a structured chat fetch error for richer, localized messaging).
*/
@SerialName("_meta")
val meta: Map<String, JsonElement>? = null
)

@Serializable
Expand Down
5 changes: 5 additions & 0 deletions clients/rust/crates/ahp-types/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2804,6 +2804,11 @@ pub struct ErrorInfo {
/// Stack trace
#[serde(default, skip_serializing_if = "Option::is_none")]
pub stack: Option<String>,
/// Additional provider-specific metadata for this error.
/// Clients MAY look for well-known optional keys here to provide enhanced UI
/// (e.g. a structured chat fetch error for richer, localized messaging).
#[serde(rename = "_meta", default, skip_serializing_if = "Option::is_none")]
pub meta: Option<JsonObject>,
}

/// A point-in-time snapshot of a subscribed resource's state, returned by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3486,15 +3486,28 @@ public struct ErrorInfo: Codable, Sendable {
public var message: String
/// Stack trace
public var stack: String?
/// Additional provider-specific metadata for this error.
/// Clients MAY look for well-known optional keys here to provide enhanced UI
/// (e.g. a structured chat fetch error for richer, localized messaging).
public var meta: [String: AnyCodable]?

enum CodingKeys: String, CodingKey {
case errorType
case message
case stack
case meta = "_meta"
}

public init(
errorType: String,
message: String,
stack: String? = nil
stack: String? = nil,
meta: [String: AnyCodable]? = nil
) {
self.errorType = errorType
self.message = message
self.stack = stack
self.meta = meta
}
}

Expand Down
5 changes: 5 additions & 0 deletions schema/actions.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2025,6 +2025,11 @@
"stack": {
"type": "string",
"description": "Stack trace"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional provider-specific metadata for this error.\nClients MAY look for well-known optional keys here to provide enhanced UI\n(e.g. a structured chat fetch error for richer, localized messaging)."
}
},
"required": [
Expand Down
5 changes: 5 additions & 0 deletions schema/commands.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,11 @@
"stack": {
"type": "string",
"description": "Stack trace"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional provider-specific metadata for this error.\nClients MAY look for well-known optional keys here to provide enhanced UI\n(e.g. a structured chat fetch error for richer, localized messaging)."
}
},
"required": [
Expand Down
5 changes: 5 additions & 0 deletions schema/errors.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,11 @@
"stack": {
"type": "string",
"description": "Stack trace"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional provider-specific metadata for this error.\nClients MAY look for well-known optional keys here to provide enhanced UI\n(e.g. a structured chat fetch error for richer, localized messaging)."
}
},
"required": [
Expand Down
5 changes: 5 additions & 0 deletions schema/notifications.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,11 @@
"stack": {
"type": "string",
"description": "Stack trace"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional provider-specific metadata for this error.\nClients MAY look for well-known optional keys here to provide enhanced UI\n(e.g. a structured chat fetch error for richer, localized messaging)."
}
},
"required": [
Expand Down
5 changes: 5 additions & 0 deletions schema/state.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,11 @@
"stack": {
"type": "string",
"description": "Stack trace"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional provider-specific metadata for this error.\nClients MAY look for well-known optional keys here to provide enhanced UI\n(e.g. a structured chat fetch error for richer, localized messaging)."
}
},
"required": [
Expand Down
6 changes: 6 additions & 0 deletions types/common/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ export interface ErrorInfo {
message: string;
/** Stack trace */
stack?: string;
/**
* Additional provider-specific metadata for this error.
* Clients MAY look for well-known optional keys here to provide enhanced UI
* (e.g. a structured chat fetch error for richer, localized messaging).
*/
_meta?: Record<string, unknown>;
}

/**
Expand Down
Loading