Repository navigation
Getting "Request failed with status code 400" on every project or app request #39
Description
Activity
same
Same here, 400 on every project/app request. Looks like the CLI calls /trpc/ endpoints but the server only responds on /api/ REST endpoints. Probably a mismatch between the shipped dist and the server version.
- added a commit that references this issue
on Apr 27, 2026 Confirming this is still broken in
@dokploy/cli@0.29.4against a fresh Dokployv0.29.4server.Root cause
apiGetinsrc/client.tssends raw input, but the tRPC v10 backend expects the transformer wrapper{json: ...}. Compare withapiPostin the same file:// apiPost — wraps correctly const response = await client.post( `/trpc/${endpoint}`, data ? { json: data } : undefined, ); // apiGet — missing the wrap const query = params ? `?input=${encodeURIComponent(JSON.stringify(params))}` : "";
Server confirms
# Without {json:...} wrap (current CLI behavior) — fails $ curl -sk -H "x-api-key: $TOKEN" \ "https://panel.example.com/api/trpc/application.one?input=$(node -e 'console.log(encodeURIComponent(JSON.stringify({applicationId:"X"})))')" {"error":{"json":{"message":"...Invalid input: expected object, received undefined...","data":{"code":"BAD_REQUEST","httpStatus":400}}}} # With {json:...} wrap — works $ curl -sk -H "x-api-key: $TOKEN" \ "https://panel.example.com/api/trpc/application.one?input=$(node -e 'console.log(encodeURIComponent(JSON.stringify({json:{applicationId:"X"}})))')" {"result":{"data":{"json":{...full app config...}}}}
Suggested fix (1 line)
export async function apiGet(endpoint, params) { const client = createClient(); const query = params - ? `?input=${encodeURIComponent(JSON.stringify(params))}` + ? `?input=${encodeURIComponent(JSON.stringify({ json: params }))}` : ""; const response = await client.get(`/trpc/${endpoint}${query}`); return response.data?.result?.data?.json ?? response.data; }Scope
Affects every
apiGetcommand with arguments:*.one,*.byProjectId,*.byApplicationId,*.byComposeId,*.allByType, etc. — basically all single-item / filtered reads.Unaffected:
apiPostcommands (write ops like*.create,*.update,*.deploy) — already wrap correctly.apiGetcommands without params (project.all,application.searchwith no filters) — no input sent, so no wrap needed.
Happy to send a PR if maintainers prefer.
Reacted by ralphwest1, andy, enisdev, Ben Josua, jaoltr, Tiziano Zonta, Jared McQueen and Taotao WangI'm trying Dokploy for the first time and spent over an hour troubleshooting this before finding this thread. Huge thanks to @sentydeploy for summarizing the root cause so clearly. I would love to see a fix pushed for this soon!
Reacted by Ben Josua and Jared McQueen- Reacted by ralphwest1, Roman Ryzhikov and Ben JosuaReacted by Jared McQueen
Hi! Is there an ETA for a new CLI release that includes this fix? This issue is currently blocking some of our automated CI/CD workflows, so having an official build would be a huge help. We're compiling from source as a temporary workaround, but we'd love to get back to an official release whenever it's ready. Thanks for your work on this!
- added a commit that references this issue
on Aug 19, 2026
Hi all, thanks for great app!
I am succesfully auth to my panel, after that I call
dokploy project alland recieve all my projectsAfter that I call
dokploy project one --projectId IawXPym-JdmnSI0_g82WaAnd I have same error every time (I tried multiple projects and applications)
dokploy --version
0.3.0