Why axios returns z_buf_error?

I am having an issue where axios returns an error

cause: Error: unexpected end of file
      at BrotliDecoder.zlibOnError [as onerror] (node:zlib:189:17) {
    errno: -5,
    code: 'Z_BUF_ERROR'

I used this function and i don’t understand why, though i’ve tried the same like a month ago

export async function getCredentials(req: Request, res: Response) {
  const { code } = req.query;

  const params = new URLSearchParams({
    client_id: process.env.CLIENT_ID as string,
    client_secret: process.env.CLIENT_SECRET as string,
    grant_type: "authorization_code",
    code: code as string,
    redirect_uri: "http://localhost:3000/api/callback",
  });

  const response = await axios.post(
    "https://discord.com/api/oauth2/token",
    params,
    {
      headers: {
        "Content-Type": "application/x-www-form-urlencoded",
      },
    }
  );

  res.json(await response.data);
}

Thank you!