mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-22 16:55:30 +01: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
|
@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- Error messages consistently show as `🚫 ope: error`
|
||||
|
||||
## [1.7.0] - 2022-03-19
|
||||
### Added
|
||||
|
|
|
@ -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…
Reference in a new issue