Skip to content

Commit

Permalink
fix: handle logbook room not found without throwing an error. (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan authored Oct 4, 2024
1 parent 3ac7673 commit 707e9e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/logbooks/logbooks.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export class LogbooksService {
),
);

if (!res.data) {
Logger.log("Logbook not found", { name });
return null;
}

Logger.log("Found logbook " + name, "LogbooksService.findByName");
const { skip, limit, sortField } = JSON.parse(filters);
Logger.log(
Expand Down

0 comments on commit 707e9e8

Please sign in to comment.