Skip to content

v1.23.0

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Nov 12:11

TL;DR: new APIs in this release: the Admin API, spoken terms, style profiles and text correction.
Translation memories, style rules and multilingual glossaries gained many options and fixes.
Read Changed and Deprecated before upgrading; no public API is removed in this release.

Added

  • DocumentTranslationException now copies HttpStatusCode and ShouldRetry from the DeepLException that
    caused it; they were always null before.
  • Added DeepLClient overloads of ListTranslationMemorySegmentsAsync() (translation memory ID or
    TranslationMemoryInfo) taking a TranslationMemorySegmentsOptions (PageSize, PageCursor, FilterText,
    FilterCaseSensitive); options left null are not sent.
  • Added a DeepLClient overload of CreateTranslationMemoryImportAsync() taking a
    CreateTranslationMemoryImportOptions (ContentType, DisplayName); its ExtraBodyParameters are added last to
    the JSON request body.
  • Added a DeepLClient overload of ImportTranslationMemoryFromFilepathAsync() taking an
    ImportTranslationMemoryOptions (DisplayName, ContentType, Timeout). ContentType is declared on the import
    job and sent with the upload (default application/xml); ExtraBodyParameters are added last to the import job
    request body.
  • Added DeepLClient overloads of WaitUntilTranslationMemoryJobDoneAsync() and
    ExportTranslationMemoryToFilepathAsync() taking a TimeSpan? timeout; a DeepLException is thrown when it
    expires before the job finishes.
  • Added DeepLClient overloads of GetTranslationMemoryJobAsync() and WaitUntilTranslationMemoryJobDoneAsync()
    taking a TranslationMemoryJob instead of the job ID.
  • TranslationMemoryJob converts implicitly to its job ID, so a job object can also be passed to the
    ITranslationMemoryManager methods taking a job ID.
  • Added TranslationMemoryJobStatus.Unknown and StatusValue on TranslationMemoryJobResult and
    TranslationMemoryJob, holding the job status as returned by the API.
  • The new translation memory overloads are members of DeepLClient; the ITranslationMemoryManager interface is
    unchanged.
  • Added DeepLClient overloads of all eight style rule methods that take a style rule ID (GetStyleRuleAsync(),
    UpdateStyleRuleNameAsync(), UpdateStyleRuleConfiguredRulesAsync(), DeleteStyleRuleAsync(),
    CreateStyleRuleCustomInstructionAsync(), GetStyleRuleCustomInstructionAsync(),
    UpdateStyleRuleCustomInstructionAsync(), DeleteStyleRuleCustomInstructionAsync()) taking a StyleRuleInfo
    instead, and overloads of the get, update and delete custom instruction methods taking a CustomInstruction
    instead of the instruction ID. CustomInstruction converts implicitly to its ID. These and the following style rule
    overloads are members of DeepLClient; the IStyleRuleManager interface is unchanged.
  • Added DeepLClient overloads of CreateStyleRuleAsync() and UpdateStyleRuleConfiguredRulesAsync() taking the
    configured rules as a Dictionary<string, Dictionary<string, string>> (category to rule to value, keyed by the API
    names), sent as given, so categories the ConfiguredRules class lacks can be sent. ConfiguredRules converts
    implicitly to this map.
  • Added DeepLClient overloads of CreateStyleRuleAsync(), UpdateStyleRuleNameAsync(),
    UpdateStyleRuleConfiguredRulesAsync(), CreateStyleRuleCustomInstructionAsync() and
    UpdateStyleRuleCustomInstructionAsync() taking a CreateStyleRuleOptions, UpdateStyleRuleNameOptions,
    UpdateStyleRuleConfiguredRulesOptions, CreateStyleRuleCustomInstructionOptions or
    UpdateStyleRuleCustomInstructionOptions. The options classes derive from BaseRequestOptions: their
    ExtraBodyParameters are added last to the JSON request body (for the configured rules, to the rules map as further
    keys).
  • Added DeepLClient.UpdateMultilingualGlossaryAsync(), taking a glossary ID or MultilingualGlossaryInfo and an
    UpdateMultilingualGlossaryOptions object (Name, Dictionaries), to rename a glossary and merge entries into
    its dictionaries in one request. Only the set properties are sent; ExtraBodyParameters are added last to the
    JSON request body.
  • Added DeepLClient overloads of CreateMultilingualGlossaryAsync() and CreateMultilingualGlossaryFromCsvAsync()
    taking a CreateMultilingualGlossaryOptions, and of ReplaceMultilingualGlossaryDictionaryAsync() and
    ReplaceMultilingualGlossaryDictionaryFromCsvAsync() taking a ReplaceMultilingualGlossaryDictionaryOptions. Both
    options classes derive from BaseRequestOptions: their ExtraBodyParameters are added last to the request body.
  • Added DeepLClient overloads of GetMultilingualGlossaryAsync() and UpdateMultilingualGlossaryNameAsync() taking
    a MultilingualGlossaryInfo instead of the glossary ID.
  • The new multilingual glossary methods and overloads are members of DeepLClient; the IGlossaryManager interface
    is unchanged.
  • Added StyleProfile to TextTranslateOptions and DocumentTranslateOptions (the ID or a StyleProfile object),
    and constructors taking a StyleProfile, to translate text and documents with a style profile (sent as
    style_profile_id).
  • Added Glossary, StyleRule and TranslationMemory to DocumentTranslateOptions, replacing GlossaryId,
    StyleId and TranslationMemoryId, as in TextTranslateOptions: each takes the ID or the resource object.
    Glossary objects can also be added to DocumentTranslateOptions.GlossaryIds.
  • Added DocumentTranslateOptions.FormalityValue: the formality value as a string, sent unchanged instead of
    Formality if set.
  • Added DocumentTranslateOptions.Filename and Stream overloads of TranslateDocumentAsync() and
    TranslateDocumentUploadAsync() without the inputFileName parameter, which send Filename as the file name.
    The FileInfo overloads send Filename instead of the file's name if it is set.
  • Added TranslateDocumentGetStatusAsync(), replacing TranslateDocumentStatusAsync().
  • Added a TranslateDocumentWaitUntilDoneAsync() overload with a TimeSpan? timeout, and
    DocumentTranslateOptions.Timeout for the wait inside TranslateDocumentAsync(). When the timeout expires, a
    DeepLException is thrown (wrapped in a DocumentTranslationException by TranslateDocumentAsync()).
  • Added DocumentStatus.StatusValue, the status string as returned by the API, and
    DocumentStatus.StatusCode.Unknown for statuses this library does not know.
  • The new document methods and overloads are members of Translator and DeepLClient; the obsolete ITranslator
    interface is unchanged.
  • Added Glossary, StyleRule and TranslationMemory to TextTranslateOptions, replacing GlossaryId, StyleId
    and TranslationMemoryId. Each takes the ID or the resource object (GlossaryInfo or MultilingualGlossaryInfo,
    StyleRuleInfo, TranslationMemoryInfo), so several resource objects can be combined in one options object.
  • GlossaryInfo, MultilingualGlossaryInfo, StyleRuleInfo, StyleProfile and TranslationMemoryInfo convert
    implicitly to their ID, so they can also be added to TextTranslateOptions.GlossaryIds, mixed with IDs. A null
    object converts to null, so assigning one leaves the option unset.
  • Added FormalityValue, SplitSentences and ModelTypeValue to TextTranslateOptions: the formality,
    split_sentences and model_type values as strings, sent unchanged instead of the Formality,
    SentenceSplittingMode and ModelType enum properties if set, for values the enums do not have.
  • Added the TagHandlingMode (Html, Xml) and TagHandlingVersion (V1, V2) constants for
    TextTranslateOptions.TagHandling and TagHandlingVersion, which still accept any string.
  • Added TextResult.TagHandlingVersion, the tag_handling_version of the response (null if absent or not a
    string).
  • Added IStyleProfileManager, implemented by DeepLClient, to manage style profiles (/v3/style_profiles):
    ListStyleProfilesAsync(), CreateStyleProfileAsync(), GetStyleProfileAsync(), UpdateStyleProfileAsync() and
    DeleteStyleProfileAsync(), with the model StyleProfile and the options classes CreateStyleProfileOptions and
    UpdateStyleProfileOptions (which adds Name). Options left null are not sent; an empty string clears the
    description or industry and an empty list unlinks all components of that kind. Both options classes derive from
    BaseRequestOptions: ExtraBodyParameters are added to the body last. The glossary, style rule list and
    translation memory lists take IDs or resource objects (SetGlossaries(), SetStyleRules(),
    SetTranslationMemories()). StyleProfile.CreationTime and UpdatedTime are non-nullable.
  • Added ISpokenTermsManager, implemented by DeepLClient, to manage Spoken Terms collections (/v3/spoken-terms):
    CreateSpokenTermsAsync(), ListSpokenTermsAsync(), GetSpokenTermsAsync(), UpdateSpokenTermsAsync(),
    GetSpokenTermsEntriesAsync(), ReplaceSpokenTermsListAsync(), DeleteSpokenTermsAsync() and
    DeleteSpokenTermsListAsync(), with the models SpokenTerms, SpokenTermsList and SpokenTermsEntries.
    Terms are checked like glossary terms before sending; an invalid term throws ArgumentException.
    UpdateSpokenTermsAsync() takes the new name and the terms to merge as an UpdateSpokenTermsOptions object
    (Name, TermLists). CreateSpokenTermsAsync(), UpdateSpokenTermsAsync() and ReplaceSpokenTermsListAsync()
    take an optional CreateSpokenTermsOptions, UpdateSpokenTermsOptions or ReplaceSpokenTermsListOptions, whose
    ExtraBodyParameters are added last to the JSON request body.
  • Added the API Pro fields of GET /v2/usage to Usage: ApiKeyCharacter (the character usage of the API key,
    as opposed to the account-wide Character), SpeechToTextMinutes, SpeechToSpeechMinutes, StartTime,
    EndTime and Products (per-product usage as Usage.Product). They are null when the response does not
    contain them, for example for non-Pro accounts. Usage.JsonFieldsStruct keeps its six character and document
    fields; the API Pro fields are parsed internally. Usage.Product properties are null when the response omits
    them.
  • Added the DeepLAdminClient class for the Admin API. It must be created with an admin API key and supports managing
    developer keys (CreateDeveloperKeyAsync(), ListDeveloperKeysAsync(), DeactivateDeveloperKeyAsync(),
    RenameDeveloperKeyAsync(), SetDeveloperKeyUsageLimitsAsync()) and retrieving usage analytics
    (GetUsageAnalyticsAsync(), GetCustomTagUsageAnalyticsAsync()). SetDeveloperKeyUsageLimitsAsync() takes a
    DeveloperKeyUsageLimitsUpdate and changes only the limits assigned in it.
    The four key-changing methods take optional CreateDeveloperKeyOptions (with the Label of the new key),
    DeactivateDeveloperKeyOptions, RenameDeveloperKeyOptions and SetDeveloperKeyUsageLimitsOptions, derived from
    BaseRequestOptions: their ExtraBodyParameters are added last to the JSON request body.
    DeepLAdminClient implements the new IAdminManager interface.
    Results use the new types DeveloperKey, DeveloperKeyUsageLimits, AdminUsageReport, AdminUsageBreakdown
    (including SpeechToSpeechMinutes), KeyUsage, CustomTagUsageReport, CustomTagUsage and
    CustomTagUsageBreakdown, and requests the enums AdminUsageGroupBy and CustomTagUsageAggregateBy; overloads
    of the analytics methods take groupBy and aggregateBy as strings, sent as given.
    DeveloperKey.Label, DeveloperKey.UsageLimits, KeyUsage.ApiKeyLabel,
    AdminUsageBreakdown.SpeechToSpeechMinutes and CustomTagUsageBreakdown.SpeechToSpeechMinutes are null when the
    API does not return them. Unexpected values in Admin API responses are skipped or replaced by defaults instead of
    failing the call; a response that is not a JSON object or array as expected, or a developer key response without
    key_id, throws a DeepLException. The SDK passes labels and limit values to the API unchanged.
    The analytics methods accept DateTime values, sent as their UTC date (Local values are converted to UTC,
    Unspecified values are treated as UTC), or "yyyy-MM-dd" strings.
    DeepLAdminClientOptions and TranslatorOptions now share the connection settings of the new BaseClientOptions
    base class.
  • Added LanguageCode constants for target language variants GermanSwiss (de-CH), GermanGermany (de-DE),
    SpanishEuropean (es-ES), FrenchCanadian (fr-CA) and FrenchEuropean (fr-FR). Like the other LanguageCode constants, they are
    deprecated with [Obsolete].
  • Added DeepLClient.GetLanguagesForResourceAsync() to retrieve the languages supported by a DeepL API resource
    (GET /v3/languages), with source/target usability, status and per-language features. Pass include values
    LanguageSupport.IncludeBeta and LanguageSupport.IncludeExternal to also return beta and third-party languages
    and features.
    A GetLanguagesForResourceAsync() overload takes a GetLanguagesForResourceOptions object whose Include list
    holds these values.
  • Added DeepLClient.GetLanguageResourcesAsync() to retrieve the DeepL API resources and their features, including
    whether each feature requires source and/or target language support (GET /v3/languages/resources).
  • Added DocumentTranslateOptions.EnableWatermark to request a "Translated by DeepL" watermark on translated
    documents (docx and pdf output only).
  • Added CorrectTextAsync() method to the DeepLClient class for correcting
    grammar and spelling errors via the v2/write/correct endpoint. It takes an optional CorrectTextOptions, whose
    ExtraBodyParameters are added to the request body last. It is a member of DeepLClient; the IWriter interface
    is unchanged.
  • TextRephraseOptions now derives from BaseRequestOptions: its ExtraBodyParameters are added to the
    RephraseTextAsync() request body last, replacing built-in parameters with the same key.
  • Added TextRephraseOptions constructors taking a WritingStyle or WritingTone enum value, and the
    ToApiValue() extension methods for both enums (e.g. WritingStyle.PreferSimple is sent as prefer_simple).
  • The targetLanguageCode parameter of RephraseTextAsync() and CorrectTextAsync() now defaults to null, so it
    can be omitted.
  • Added DeepLException.HttpStatusCode, the HTTP status of the failed response (null if there was none), and
    DeepLException.ShouldRetry: true for HTTP 429, 5xx and transient network failures (timeouts, failed connections),
    [secure] for other HTTP statuses. For CreateDeveloperKeyAsync(), which is not safe to repeat, it is true only for
    HTTP 429, name resolution failures and refused connections. Both are also set for errors of pre-signed storage URLs.
  • Added the Proxy option to DeepLClientOptions and DeepLAdminClientOptions: the URL of an HTTP(S) proxy for all
    requests, with optional credentials in the URL. Unlike a custom ClientFactory, it keeps the built-in retries and
    timeouts.
  • Added the static method DeepLClient.IsFreeAccountAuthKey(), replacing Translator.AuthKeyIsFreeAccount().
  • Added DeepLClient overloads of UpdateMultilingualGlossaryNameAsync(),
    UpdateMultilingualGlossaryDictionaryAsync() and UpdateMultilingualGlossaryDictionaryFromCsvAsync() taking a
    BaseRequestOptions; its ExtraBodyParameters are added last to the request body. The IGlossaryManager interface
    is unchanged.

Changed

  • The README documents source language detection with glossaries in text translation: with a null source language,
    DeepL detects it and applies the glossary's dictionary for the detected language pair.
  • Because GlossaryInfo, MultilingualGlossaryInfo, StyleRuleInfo, StyleProfile and TranslationMemoryInfo now
    convert implicitly to string, code recompiled against this version that passes one of them to an API with a
    string overload, such as Console.WriteLine(glossary), "..." + glossary, StringBuilder.Append(glossary) or
    string.Join(", ", a, b), now gets the bare ID instead of ToString() (Glossary "name" (id)). Interpolation
    ($"{glossary}") still uses ToString(). ToString() is for diagnostics only; Language already behaves this way.
    CustomInstruction now also converts implicitly to string. It has no ToString() override, so these calls print
    its ID, or an empty string if it has none, instead of the type name DeepL.Model.CustomInstruction.
  • Target languages EN and PT are no longer rejected client-side in text translation, document translation and
    rephrasing. The API translates them as en-US and pt-PT respectively.
  • GetSourceLanguagesAsync(), GetTargetLanguagesAsync(), and GetGlossaryLanguagesAsync() now
    call the GET /v3/languages endpoint instead of the deprecated GET /v2/languages and
    GET /v2/glossary-language-pairs endpoints. No public API changes, but the returned language lists may include
    additional languages.
  • Retries now cover only HTTP 429, 5xx responses and transient network failures (timeouts, failed connections). Before,
    any exception thrown while sending a request was retried.
  • Each attempt of a request may now run until the time the client would wait before retrying it (the backoff delay)
    when that is longer than PerRetryConnectionTimeout; Timeout.InfiniteTimeSpan still disables it.
    OverallConnectionTimeout (default 100 seconds) still limits a request including all retries.
  • Content-Type, Content-Length, Transfer-Encoding and Host entries in Headers are now ignored; previously the
    first two made every request fail with a ConnectionException and the others were sent.
  • An Accept entry in Headers is now ignored where the library sets its own; previously both were sent.
  • Calls that pass null or default as the first optional argument of the translation memory methods with new
    options overloads are now ambiguous and no longer compile when recompiled against this version (CS0121):
    ListTranslationMemorySegmentsAsync(id, null), ListTranslationMemorySegmentsAsync(id, default),
    ListTranslationMemorySegmentsAsync(translationMemory, null),
    ListTranslationMemorySegmentsAsync(translationMemory, default), CreateTranslationMemoryImportAsync(fileName, contentLength, null) and ImportTranslationMemoryFromFilepathAsync(path, null); previously they compiled. Drop the
    argument, cast it to the parameter type (for example (TranslationMemorySegmentsOptions?)null), or pass it as a
    named argument (for example displayName: null).
    Already-compiled callers are unaffected.
  • A 3xx response the HTTP client does not follow (for example 304, or a redirect without a Location header) now
    throws a DeepLException with HttpStatusCode set; previously it was treated as a success.
  • GlossaryEntries.FromTsv() now stores and sends the trimmed, validated entries joined with \n, without blank
    lines; previously it sent the original string, with untrimmed terms and \r\n line endings. With
    skipChecks: true the string is still sent unchanged.
  • HTTP 401 now throws an AuthorizationException, like HTTP 403; previously it threw a DeepLException with an
    "Unexpected status code" message. AuthorizationException derives from DeepLException.
  • Members marked [Obsolete] in this release now raise warning CS0618 in code recompiled against it (an error with
    TreatWarningsAsErrors); already-compiled callers are unaffected.

Deprecated

  • GlossaryNotFoundException is deprecated; catch NotFoundException, its base class. Glossary endpoints
    still throw it on HTTP 404 until the next major version, which throws NotFoundException.
  • Deprecated the DeepLClient.CreateStyleRuleAsync() and UpdateStyleRuleConfiguredRulesAsync() overloads taking a
    ConfiguredRules object with [Obsolete]; use the overloads taking a Dictionary<string, Dictionary<string, string>>
    instead. They keep working until the next major version. A CreateStyleRuleAsync() call without configured rules
    now uses the new overload and sends the same request; passing null for the configured rules still calls the
    deprecated overload.
  • Deprecated TextTranslateOptions.GlossaryId, StyleId and TranslationMemoryId with [Obsolete]; use Glossary,
    StyleRule and TranslationMemory instead. They keep working until the next major version. Error messages of text
    translation name the new properties, e.g. "Glossary and GlossaryIds cannot be used together".
  • Deprecated DocumentTranslateOptions.GlossaryId, StyleId and TranslationMemoryId with [Obsolete]; use
    Glossary, StyleRule and TranslationMemory instead. They keep working until the next major version. Error
    messages of document translation name the new properties, as for text translation.
  • Deprecated Translator.TranslateDocumentStatusAsync() with [Obsolete]; use TranslateDocumentGetStatusAsync()
    instead. It keeps working until the next major version.
  • Deprecated the language code constants of the LanguageCode class (for example LanguageCode.German) with
    [Obsolete]; they will be removed in the next major version. Pass the language code as a string, for example
    "de", and use GetSourceLanguagesAsync() and GetTargetLanguagesAsync() to retrieve the supported languages.
    LanguageCode.RemoveRegionalVariant() is not deprecated.
  • Deprecated document minification with [Obsolete]: DocumentTranslateOptions.EnableDocumentMinification,
    DocumentMinifier, IDocumentMinifier, DocumentMinificationException and DocumentDeminificationException.
    They keep working and will be removed in the next major version. The DeepL API accepts larger documents than when
    minification was added; see the usage limits.
  • Deprecated public types that are implementation details with [Obsolete]: DeepL.Internal.LargeFormUrlEncodedContent,
    MultilingualGlossaryDictionaryEntriesResult, and the MultilingualGlossaryDictionaryEntries constructor that takes a
    MultilingualGlossaryDictionaryEntriesResult. They keep working and will be made internal in the next major version.
  • Deprecated Translator, ITranslator and TranslatorOptions with [Obsolete]; use DeepLClient and
    DeepLClientOptions instead. They keep working and will be removed in the next major version.
  • Deprecated Translator.AuthKeyIsFreeAccount() with [Obsolete]; use DeepLClient.IsFreeAccountAuthKey() instead.

Fixed

  • The first retry now waits exactly 1 second, and the first attempt's backoff deadline is exactly 1 second; the ±23 %
    jitter applies only from the second backoff on.
  • TLS and certificate failures and proxy tunnel rejections are no longer retried, and their ConnectionException
    has ShouldRetry set to [secure]. Connect, name resolution, timeout and connection reset failures are still
    retried.
  • Document uploads from a non-seekable Stream (e.g. a network stream) are now buffered before sending, so a retry
    after HTTP 429, 5xx or a network failure resends the full document instead of failing.
  • CreateDeveloperKeyAsync retries refused connections and connect timeouts, as its documentation says.
  • On .NET 5 and later, connecting is limited to half of PerRetryConnectionTimeout, so that a hanging connect fails
    as a connect timeout instead of a per-attempt timeout, and CreateDeveloperKeyAsync retries it. Before, a hanging
    connect was cut by the per-attempt timeout, which CreateDeveloperKeyAsync does not retry.
  • ImportTranslationMemoryFromFilepathAsync now reads the input file, and ExportTranslationMemoryToFilepathAsync
    creates the output file, before creating the job: an unreadable input, existing output or unwritable path throws its
    IOException, UnauthorizedAccessException or DirectoryNotFoundException before any job exists; previously after
    the job was created. A completed export job without a download URL throws a DeepLException instead of an
    ArgumentException. The output file is deleted if the export fails.
  • Fixed GetTranslationMemoryJobAsync() failing on a job status this library does not know: it is now parsed as
    TranslationMemoryJobStatus.Unknown, and WaitUntilTranslationMemoryJobDoneAsync() keeps polling on it.
  • Fixed GetTranslationMemoryJobAsync() and CreateTranslationMemoryExportAsync() failing when the job's
    parameters, error or status_metadata object contains a non-string field; unknown fields are now ignored.
  • Multilingual glossary IDs are now URL-encoded in request paths.
  • CreateMultilingualGlossaryAsync() and CreateMultilingualGlossaryFromCsvAsync() now throw
    GlossaryNotFoundException on HTTP 404, like the other multilingual glossary methods.
  • GetMultilingualGlossaryDictionaryEntriesAsync() no longer throws ArgumentException for entries returned by the
    API that the client-side entry checks would reject.
  • ReplaceMultilingualGlossaryDictionaryAsync() and ReplaceMultilingualGlossaryDictionaryFromCsvAsync() now send
    the request body as JSON, the only content type the API accepts for this endpoint.
  • RephraseTextAsync() and CorrectTextAsync() throw a DeepLException if the response holds no improvements or
    fewer than texts were sent, instead of returning null, a short array, or throwing a NullReferenceException or
    IndexOutOfRangeException.
  • A Write API response without detected_source_language throws a DeepLException instead of a
    NullReferenceException.
  • An unknown document status in the response no longer fails TranslateDocumentStatusAsync(),
    TranslateDocumentWaitUntilDoneAsync() and TranslateDocumentAsync(). Before, it threw a DeepLException
    ("Failed to deserialize JSON in received response"); now DocumentStatus.Status is StatusCode.Unknown and the
    waiting methods keep polling.
  • The document ID is now URL-encoded in the paths of the document status and download requests. Before, an ID
    containing characters such as / or ? was inserted as is and addressed a different URL.
  • ExtraBodyParameters with a text key now replace the texts of TranslateTextAsync(), like any other parameter.
    Before, the extra text was sent in addition to the texts.
  • TranslateTextAsync() now throws a DeepLException when the response holds no translations, an empty list, or
    fewer translations than texts sent, or a translation without detected_source_language. Before, it returned null
    or threw a NullReferenceException or IndexOutOfRangeException.
  • A request that exceeds PerRetryConnectionTimeout now throws a ConnectionException with a "Request timed out"
    message, like the other timeouts, instead of "Unexpected request failure".
  • Cancelling a request through the CancellationToken argument now always rethrows the cancellation exception. Before,
    a plain OperationCanceledException raised by the HTTP handler was wrapped in a ConnectionException.
    Document translation still wraps it in a DocumentTranslationException, with the cancellation exception as
    InnerException.
  • Fixed the doc comments of LanguageCode.English and LanguageCode.Portuguese, which claimed they may only be used as
    source languages.
  • A malformed or mistyped JSON response now throws a DeepLException with the JsonException as InnerException.
    Before, the raw JsonException was thrown.