mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-11 11:55:08 +01:00
Fix error messages for providers api
This commit is contained in:
parent
61a7607258
commit
061cb548d0
@ -23,7 +23,7 @@ export interface ScrapingSegment {
|
|||||||
embedId?: string;
|
embedId?: string;
|
||||||
status: "failure" | "pending" | "notfound" | "success" | "waiting";
|
status: "failure" | "pending" | "notfound" | "success" | "waiting";
|
||||||
reason?: string;
|
reason?: string;
|
||||||
error?: unknown;
|
error?: any;
|
||||||
percentage: number;
|
percentage: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,8 @@ export function ScrapeErrorPart(props: ScrapeErrorPartProps) {
|
|||||||
Object.values(data.sources).forEach((v) => {
|
Object.values(data.sources).forEach((v) => {
|
||||||
str += `${v.id}: ${v.status}\n`;
|
str += `${v.id}: ${v.status}\n`;
|
||||||
if (v.reason) str += `${v.reason}\n`;
|
if (v.reason) str += `${v.reason}\n`;
|
||||||
|
if (v.error?.message)
|
||||||
|
str += `${v.error.name ?? "unknown"}: ${v.error.message}\n`;
|
||||||
if (v.error) str += `${v.error.toString()}\n`;
|
if (v.error) str += `${v.error.toString()}\n`;
|
||||||
});
|
});
|
||||||
return str;
|
return str;
|
||||||
|
Loading…
Reference in New Issue
Block a user