Skip to content

Commit 4b24eda

Browse files
committed
fix: #405 when no project exist
1 parent 8eb604b commit 4b24eda

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/app/modules/time-clock/store/entry.effects.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,12 @@ export class EntryEffects {
136136
return new actions.CreateEntry(entry);
137137
}),
138138
catchError((error) => {
139-
this.toastrService.error('We could not clock in you, try again later.');
140-
return of(new actions.CreateEntryFail('Error'));
139+
if (error.status === 404) {
140+
return of(new actions.CreateEntry(entry));
141+
} else {
142+
this.toastrService.error('We could not clock in you, try again later.');
143+
return of(new actions.CreateEntryFail('Error'));
144+
}
141145
})
142146
)
143147
)

0 commit comments

Comments
 (0)