diff --git a/specification/appconfiguration/AppConfiguration/client.tsp b/specification/appconfiguration/AppConfiguration/client.tsp index 7b5ef1e841d9..891871fc263b 100644 --- a/specification/appconfiguration/AppConfiguration/client.tsp +++ b/specification/appconfiguration/AppConfiguration/client.tsp @@ -7,10 +7,6 @@ using AzureAppConfiguration; namespace SdkCustomizations; -// Cross-language customizations -// except Java, since Java has built-in type in azure-core for Error model. -@@clientName(Foundations.Error, "ErrorDetail", "python,csharp,javascript,go"); - // Python specific customizations @@clientName(KeyValueFields, "ConfigurationSettingFields", "python"); @@clientName(CompositionType, "SnapshotComposition", "python"); diff --git a/specification/appconfiguration/AppConfiguration/models.tsp b/specification/appconfiguration/AppConfiguration/models.tsp index eefb14ce0daf..ec35a207e6da 100644 --- a/specification/appconfiguration/AppConfiguration/models.tsp +++ b/specification/appconfiguration/AppConfiguration/models.tsp @@ -314,6 +314,8 @@ model Label { name?: string; } +model ErrorDetail is Foundations.Error; + @doc("Details of a long running operation.") model OperationDetails { @doc("The unique id of the operation.") @@ -326,5 +328,5 @@ model OperationDetails { An error, available when the status is `Failed`, describing why the operation failed. """) - error?: Foundations.Error; + error?: ErrorDetail; } diff --git a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/2023-11-01/appconfiguration.json b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/2023-11-01/appconfiguration.json index 387cd34363c3..b358eba2d935 100644 --- a/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/2023-11-01/appconfiguration.json +++ b/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/2023-11-01/appconfiguration.json @@ -2691,6 +2691,40 @@ } } }, + "ErrorDetail": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + }, + "x-ms-identifiers": [] + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, "Key": { "type": "object", "description": "Keys serve as identifiers for key-values and are used to store and retrieve corresponding values.", @@ -2936,7 +2970,7 @@ "description": "The current status of the operation" }, "error": { - "$ref": "#/definitions/Azure.Core.Foundations.Error", + "$ref": "#/definitions/ErrorDetail", "description": "An error, available when the status is `Failed`, describing why the operation\nfailed." } },