Deeplx-vercel icon indicating copy to clipboard operation
Deeplx-vercel copied to clipboard

Vercel Error

Open r4h4t094 opened this issue 7 months ago • 3 comments
trafficstars

When I Tried This Api on localhost, koyeb and render it worked but when tried in vercel it showing this error

Error: 500 Response: {"code":500,"message":"Ошибка перевода","error":"Ошибка от сервера DeepL: 429 - { "code": 429, "message": "Too many requests. Please slow down and try again later." }\n"}

r4h4t094 avatar Apr 03 '25 17:04 r4h4t094

When I Tried This Api on localhost, koyeb and render it worked but when tried in vercel it showing this error

Error: 500 Response: {"code":500,"message":"Ошибка перевода","error":"Ошибка от сервера DeepL: 429 - { "code": 429, "message": "Too many requests. Please slow down and try again later." }\n"}

Most likely the query method is outdated. I'll do an update tomorrow

bropines avatar Apr 03 '25 18:04 bropines

Another Thing I Added localhost support on this repo. We dont need to use the other repo you mentiond in repo

// server.js const express = require('express'); const app = express(); const PORT = 3000;

// Middleware app.use(express.json()); app.use((req, res, next) => { res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS'); res.header('Access-Control-Allow-Headers', 'Content-Type'); next(); });

// Routes app.get('/', (req, res) => { res.json({ code: 200, message: "Welcome to DeepL Free API. POST to /api/translate." }); });

// Import translate endpoint (FIXED PATH) const translateHandler = require('./api/translate'); app.post('/api/translate', translateHandler);

// Start server app.listen(PORT, () => { console.log(Server running on http://localhost:${PORT}); });

bro add this on root then just run : node server.js

r4h4t094 avatar Apr 04 '25 06:04 r4h4t094

then just run : node server.js

Added

But what about the 429 error... I think the problem is in the vercel itself. Because deepl started to detect requests from vercel. I have no idea how to solve this yet. The catch is that on my PC and IP it pulls at least 100 requests per minute, but on vercel it falls after 5.

bropines avatar Apr 04 '25 09:04 bropines