Skip to content
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

Merged
merged 7 commits into from
Jan 8, 2020

Conversation

mssfang
Copy link
Member

@mssfang mssfang commented Jan 8, 2020

  • 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.

@mssfang mssfang added Client This issue points to a problem in the data-plane of the library. Text Analytics labels Jan 8, 2020
@mssfang mssfang added this to the [2020] January milestone Jan 8, 2020
@mssfang mssfang self-assigned this Jan 8, 2020
@mssfang mssfang requested a review from samvaity January 8, 2020 01:37
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 -->
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 400 -> 404

Copy link
Member

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).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@samvaity samvaity Jan 8, 2020

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 🙆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - Text Analytics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants