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:
@@ -155,6 +155,7 @@ export default function ComposeScreen() {
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
const body = JSON.stringify(payload);
|
const body = JSON.stringify(payload);
|
||||||
|
console.log("[compose] POST", `${baseUrl}/posts`, body);
|
||||||
|
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const res = await globalThis.fetch(`${baseUrl}/posts`, {
|
const res = await globalThis.fetch(`${baseUrl}/posts`, {
|
||||||
@@ -170,7 +171,8 @@ export default function ComposeScreen() {
|
|||||||
let detail = "";
|
let detail = "";
|
||||||
try {
|
try {
|
||||||
const raw = await res.text();
|
const raw = await res.text();
|
||||||
detail = raw.slice(0, 300);
|
console.log("[compose] 400 body:", raw);
|
||||||
|
detail = raw.slice(0, 500);
|
||||||
} catch {
|
} catch {
|
||||||
detail = res.statusText;
|
detail = res.statusText;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user