chore(pl24): log full response shape when images field is missing (temp diagnostic)

This commit is contained in:
Semih
2026-05-14 20:33:24 +00:00
parent cf82e49678
commit 7f0f17580e

View File

@@ -293,6 +293,14 @@ export class PL24Service {
const rawImages = (data?.data as any)?.images || data?.images;
if (rawImages)
this.logger.log(`[imgdbg] images field: ${JSON.stringify(rawImages).substring(0, 500)}`);
else {
// No images: dump top-level keys + a shallow preview to understand response shape
const topKeys = Object.keys(data || {});
const dataKeys = data?.data && typeof data.data === "object" ? Object.keys(data.data) : null;
this.logger.log(
`[imgdbg] NO images for illustrationId=${illustrationId}. topKeys=${JSON.stringify(topKeys)} dataKeys=${JSON.stringify(dataKeys)} sample=${JSON.stringify(data).substring(0, 800)}`,
);
}
const imageData = this.extractImageData(data);
let parts = this.parsePartsResponse(data);