Spaces:
Build error
Build error
File size: 666 Bytes
0bfe2e3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import { Settings } from '@aiostreams/utils';
export const errorResponse = (
errorMessage: string,
origin?: string,
path?: string,
externalUrl?: string
) => {
return {
streams: [errorStream(errorMessage, 'Error', origin, path, externalUrl)],
};
};
export const errorStream = (
errorMessage: string,
errorTitle?: string,
origin?: string,
path?: string,
externalUrl?: string
) => {
return {
externalUrl:
(origin && path ? origin + path : undefined) ||
externalUrl ||
'https://github.com/Viren070/AIOStreams',
name: `[❌] ${Settings.ADDON_NAME}\n${errorTitle || 'Error'}`,
description: errorMessage,
};
};
|