mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 19:32:07 +00:00
Fix next edge runtime not liking error in logs (#247)
* Fix next edge runtime not liking error in logs * Fix other errors
This commit is contained in:
+5
-1
@@ -433,7 +433,11 @@ export async function getSpaceCustomization(spaceId: string): Promise<Customizat
|
||||
const parsed = rison.decode_object<Partial<CustomizationSettings>>(extend);
|
||||
return { ...raw, ...parsed };
|
||||
} catch (error) {
|
||||
console.error('Failed to parse x-gitbook-customization header (ignored)', error);
|
||||
console.error(
|
||||
`Failed to parse x-gitbook-customization header (ignored): ${
|
||||
(error as Error).stack ?? (error as Error).message ?? error
|
||||
}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -208,7 +208,7 @@ function logIgnoredError(message: string, error: Error) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.error(message, error);
|
||||
console.error(`${message}: ${error.stack ?? error.message ?? error}`);
|
||||
}
|
||||
|
||||
const UndefinedSymbol = Symbol('Undefined');
|
||||
|
||||
+5
-1
@@ -108,7 +108,11 @@ export async function getImageSize(
|
||||
height: json.original.height,
|
||||
};
|
||||
} catch (error) {
|
||||
console.error(`failed to fetch image size for ${input}`, error);
|
||||
console.error(
|
||||
`failed to fetch image size for ${input}: ${
|
||||
(error as Error).stack ?? (error as Error).message ?? error
|
||||
}`,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user