Comments (2)
For POJO Investigation, we can't add customized exception to below Maps exception hierarchy. Because the exception structure could change, we only know the exception should have error code and error message. Other values such as value and inner error which is optional. If service changes the exception type to return, it breaks our SDK exception type. Thus, we SHOULD not add the customized exception type in SDK.
try {
ChatCompletions chatCompletions = client.getChatCompletions(deploymentOrModelId, new ChatCompletionsOptions(chatMessages));
System.out.println(chatCompletions.getId());
System.out.println(chatCompletions.getCreatedAt());
} catch (HttpResponseException ex) {
HashMap<String, Object> exValue = (HashMap) ex.getValue();
HashMap<String, Object> errorMap = (HashMap) exValue.get("error");
HashMap<String, Object> innerErrorMap =(HashMap) errorMap.get("innererror");
ContentFilterResultDetailsForPrompt contentFilterResult1 =
BinaryData
.fromObject(innerErrorMap.get("content_filter_result"))
.toObject(ContentFilterResultDetailsForPrompt.class);
}
from azure-sdk-for-java.
(1) and (2) Azure OpenAI service team should align the exception message. NO ACTION in SDK side.
from azure-sdk-for-java.
Related Issues (20)
- Track 1 performance libraries shouldn't depend on perf-test-core
- [Kafka V2]Preseve in-order processing
- Broken links, stale references to Azure AD instead of Entra, and wrong Auth guidance HOT 2
- Parameter `azureLibraries` seems to be required
- Add artifact coordinates for all azure-core-http implementations
- io.netty.util.IllegalReferenceCountException after upgrading azure-cosmos from v4.53.1 to v4.56.0 [BUG] HOT 4
- [BUG] Blobs copied using copyWithUrl method are returning InputStream of 0 bytes
- [FEATURE REQ] Generic core logging: add a check+error for `log(String.format`
- Incorrect return type for getTracingOptions() documented HOT 2
- Can you increase the version of the dependency com.fasterxml.jackson.dataformat:jackson-dataformat-xml above 2.15.3 ? HOT 10
- Add logs to detect non parametrized queries (NPQs) in cosmosDB HOT 2
- [FEATURE REQ] mgmt, support convenience API for publicNetworkAccess
- [QUERY] Deployment template parameter parsing failure HOT 4
- 1ES template integration follow-ups HOT 3
- [FEATURE REQ] Allow specification of partition key when calling findBy<Field> or deleteBy<Field> in Cosmos Spring Data where <Field> is not the primary key of the entity HOT 30
- [QUERY] ServiceBusSenderClient Thread safe? HOT 3
- [FEATURE REQ] Support `dimensions` EmbeddingOptions in OpenAI API HOT 3
- [BUG]CosmosDiagnosticsContext being null when the diagnostics is sampled out HOT 1
- [BUG] azure-storage-blob library with azure-core-http-okhttp client prevents application from termination for 60 seconds. HOT 4
- [BUG] TableServiceClient.createTableIfNotExistsWithResponse() with wrong error handling and response code HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-sdk-for-java.