Skip to content

Commit e6648ae

Browse files
committed
Fix 404 error handling
1 parent c780a96 commit e6648ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/app/src/app/overmind/internalActions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,9 @@ export const onApiError: Action<ApiError> = (
371371
const result = response.data;
372372

373373
if (result) {
374-
if ('errors' in result) {
374+
if (typeof result === 'string') {
375+
error.message = result;
376+
} else if ('errors' in result) {
375377
const errors = values(result.errors)[0];
376378
if (Array.isArray(errors)) {
377379
if (errors[0]) {

0 commit comments

Comments
 (0)