-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added codesnippet for sync client and builder #7254
Conversation
mssfang
commented
Jan 8, 2020
•
edited
Loading
edited
- Fixed sync [Feature] Text Analytics Codesnippet #6874,
- removed detectLanguage(string text, string countryHint) method to align with other API.
- renamed analyzeBatchSentimentWithResponse(String text, String language, Context context)) to analyzeSentimentWithResponse
- fixed tests, that include added tests for faultyText in sync and async client.
...ics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClient.java
Show resolved
Hide resolved
...ics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClient.java
Outdated
Show resolved
Hide resolved
...re-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/TextAnalyticsClientBuilder.java
Show resolved
Hide resolved
...tics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java
Show resolved
Hide resolved
...tics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java
Outdated
Show resolved
Hide resolved
...tics/src/samples/java/com/azure/ai/textanalytics/TextAnalyticsClientJavaDocCodeSnippets.java
Outdated
Show resolved
Hide resolved
document IDs, 400 error is return that indicating bad request. In the following code snippet, the error is handled | ||
gracefully by catching the exception and display the additional information about the error. | ||
|
||
<!-- embedme ./src/samples/java/com/azure/ai/textanalytics/ReadmeSamples.java#L164-L169 --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct the line numbers here.
## General | ||
### General | ||
Text Analytics clients raise exceptions. For example, if you try to detect the languages of a batch of text with same | ||
document IDs, 400 error is return that indicating bad request. In the following code snippet, the error is handled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: 400 -> 404
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
404 is an interesting HTTP error code for "Bad Request'. Traditionally, 400 is bad request... and 404 is "Not found". (ie. this URL you made does not exist).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh mistyped I mean 400
itself just syntax highlighted 🙆