Add preferences and privacy policy
This commit is contained in:
@@ -31,7 +31,7 @@ export function ThrowApiError(e: unknown): never {
|
||||
|
||||
// Map ApiError 'code' values
|
||||
if (e instanceof ApiError) {
|
||||
console.error(JSON.stringify(e), e.code, "ERRCODE")
|
||||
console.error(JSON.stringify(e), e.code, 'ERRCODE');
|
||||
let status = 500;
|
||||
if (e.code === 'AUTH') {
|
||||
status = 401;
|
||||
@@ -54,7 +54,7 @@ export function ThrowApiError(e: unknown): never {
|
||||
|
||||
// Fallback for other error kind
|
||||
const genericMessage = e instanceof Error ? e.message : 'An unexpected error occurred.';
|
||||
console.log(e)
|
||||
console.log(e);
|
||||
throw error(500, {
|
||||
message: genericMessage,
|
||||
name: 'CRITICAL_ERROR',
|
||||
|
||||
Reference in New Issue
Block a user