mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-05 21:47:48 +01:00
Handle raw number errors, I guess
This commit is contained in:
@@ -14,6 +14,8 @@ export default function Error({ error }) {
|
|||||||
|
|
||||||
if (typeof error === "string") {
|
if (typeof error === "string") {
|
||||||
error = { message: error }; // eslint-disable-line no-param-reassign
|
error = { message: error }; // eslint-disable-line no-param-reassign
|
||||||
|
} else if (typeof error === "number") {
|
||||||
|
error = { message: `Error ${error}` }; // eslint-disable-line no-param-reassign
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error?.data?.error) {
|
if (error?.data?.error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user