feat: improve release error reporting and test coverage (#813)

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen
2026-07-12 21:52:34 -04:00
committed by GitHub
parent 15f193d7d8
commit f6b913c3f9
11 changed files with 623 additions and 144 deletions
+18
View File
@@ -28,6 +28,24 @@ export interface Config {
input_make_latest: 'true' | 'false' | 'legacy' | undefined;
}
export const errorMessage = (error: unknown): string => {
if (error instanceof Error) {
return error.message;
}
if (
typeof error === 'object' &&
error !== null &&
'message' in error &&
typeof error.message === 'string'
) {
return error.message;
}
if (error === null || error === undefined) {
return 'Unknown error';
}
return String(error);
};
export const uploadUrl = (url: string): string => {
const templateMarkerPos = url.indexOf('{');
if (templateMarkerPos > -1) {