TimLuo465 / baidu-translate-api

A free and unlimited API for Baidu Translate
MIT License
71 stars 17 forks source link

Error code 1022 #23

Open george-essa opened 3 years ago

george-essa commented 3 years ago

I'm getting the following error, consistently:

{
  errno: 1022,
  errmsg: '访问出现异常,请刷新后重试!',
  error: 1022,
  errShowMsg: '访问出现异常,请刷新后重试!' 
}

code to reproduce :

const RequestOptions = {
    "from" : "auto",
    "to" : "spa"
}

exports.translate_text = async (text) => {
        await translate(text, RequestOptions)
        .then(value => //some code )
        .catch(err => console.log(err))
}

Any ideas how to solve this?