plainheart / bing-translate-api

A simple and free API for Bing & Microsoft Translator for Node.js
https://github.com/plainheart/bing-translate-api
MIT License
156 stars 28 forks source link

HttpError: 205 status code (Reset Content) #16

Closed sedovdmitry closed 1 year ago

sedovdmitry commented 1 year ago

Hello, I ran the example from the Usage block and the status code 205 is always returned.

Example code

const { translate } = require('bing-translate-api');

translate('你好', null, 'en', true).then(res => {
  console.log(res.translation);
}).catch(err => {
  console.error(err);
});

Return

Error: Something went wrong! The response is {"statusCode":205,"errorMessage":""}.
    at translate (C:\Users\dmitry\projects\NEST\translator\node_modules\bing-translate-api\src\index.js:193:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Yesterday it worked like it should. Is this normal behavior or something new?

plainheart commented 1 year ago

Fixed in v2.7.0. Please upgrade to the latest version and try it again.

chimytech commented 1 year ago

遇到同样的问题,求助

plainheart commented 1 year ago

@chimytech issue 已经回复,升级到 2.7.0 或最新版即可。