chore(pl24): log full response shape when images field is missing (temp diagnostic)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user