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);
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user