feat: cover arrays in error handling
This commit is contained in:
@@ -9,7 +9,7 @@ export default class BaseError extends Error {
|
||||
try {
|
||||
computedError = JSON.parse(error as string);
|
||||
} catch {
|
||||
computedError = typeof error === 'string' ? { error } : error;
|
||||
computedError = (typeof error === 'string' || Array.isArray(error)) ? { error } : error;
|
||||
}
|
||||
|
||||
let computedMessage: string;
|
||||
|
Reference in New Issue
Block a user