Skip to content

400 Bad request errors with Japanese texts #55

Description

@ttreder-explorance

Describe the bug
We are getting 400 errors when calling POST /v2/translate with the DeepL-node library translateText() method when using Japanese comments from the following file.

To Reproduce
Steps to reproduce the behavior:

  • Load all the comments from the provided xlsx file into an array.
  • Batch comments with payload size < 120KiB.
  • Call translateText() with arrays of comments, no sourceLang param and 'en-US' as targetLang.
  • The first 4 batches should fail with this response:
    DeepL API response POST /v2/translate 400 Response details:, content =
  • The 5th batch should succeed with a 200 OK response.

Expected behavior
The /v2/translate endpoint should have a consistent behaviour when translating Japanese texts.

Environment:

  • NodeJS: 18.0
  • DeepL-node: 1.13.0
  • macOS, Windows or Linux

Additional context
We did try the translation API with a lot of different languages, so far Japanese seems to be the only one causing this issue.
Also worth noting that when we use the /document DeepL API translate the document correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/api-changerelated to changing an upstream APIkind/bugrelated to a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions