mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-05-09 19:51:36 +02:00
Made error message format consistent (#591)
Co-authored-by: Max Isom <codetheweb@users.noreply.github.com>
This commit is contained in:
parent
88d49de5a1
commit
cf49053370
2 changed files with 5 additions and 3 deletions
|
@ -1,11 +1,11 @@
|
|||
export default (error?: string | Error): string => {
|
||||
let str = '🚫 unknown error';
|
||||
let str = 'unknown error';
|
||||
|
||||
if (error) {
|
||||
if (typeof error === 'string') {
|
||||
str = `🚫 ${error}`;
|
||||
str = `🚫ope: ${error}`;
|
||||
} else if (error instanceof Error) {
|
||||
str = `🚫 ope: ${error.message}`;
|
||||
str = `🚫ope: ${error.message}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue