Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: #405 when no project exist
  • Loading branch information
enriquezrene committed Jul 29, 2020
commit 4b24eda4ec273da3482fd775a8c0cbc704929da2
8 changes: 6 additions & 2 deletions src/app/modules/time-clock/store/entry.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,12 @@ export class EntryEffects {
return new actions.CreateEntry(entry);
}),
catchError((error) => {
this.toastrService.error('We could not clock in you, try again later.');
return of(new actions.CreateEntryFail('Error'));
if (error.status === 404) {
return of(new actions.CreateEntry(entry));
} else {
this.toastrService.error('We could not clock in you, try again later.');
return of(new actions.CreateEntryFail('Error'));
}
})
)
)
Expand Down