Skip to content

Commit

Permalink
Fix error handling, take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelDeMartin committed Jan 29, 2025
1 parent 4078caa commit 9192911
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/models/SolidModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
assert,
fail,
invert,
isInstanceOf,
isPromise,
map,
md5,
Expand All @@ -32,6 +33,7 @@ import {
} from '@noeldemartin/utils';
import {
DocumentAlreadyExists,
DocumentNotFound,
FieldType,
InvalidModelDefinition,
Model,
Expand Down Expand Up @@ -318,7 +320,7 @@ export class SolidModel extends SolidModelBase {

return model;
} catch (error) {
if (applyStrictChecks()) {
if (applyStrictChecks() && !isInstanceOf(error, DocumentNotFound)) {
throw error;
}

Expand Down

0 comments on commit 9192911

Please sign in to comment.