debug: log POST body and full 400 response in compose

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
billisdead
2026-05-21 23:32:36 +02:00
parent 3d2ba858bb
commit be57d581ac
@@ -155,6 +155,7 @@ export default function ComposeScreen() {
}),
};
const body = JSON.stringify(payload);
console.log("[compose] POST", `${baseUrl}/posts`, body);
// eslint-disable-next-line no-undef
const res = await globalThis.fetch(`${baseUrl}/posts`, {
@@ -170,7 +171,8 @@ export default function ComposeScreen() {
let detail = "";
try {
const raw = await res.text();
detail = raw.slice(0, 300);
console.log("[compose] 400 body:", raw);
detail = raw.slice(0, 500);
} catch {
detail = res.statusText;
}