Skip to content

Commit

Permalink
Fix another type error
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacialCircumstances committed Nov 20, 2024
1 parent 230a45a commit 5c881f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/api/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ export const object = <T>(objValidator: ObjectValidator<T>): Validator<T> => {
const validator: Validator<any> = objValidator[key];
n[key] = validator(v[key]);
} catch (e) {
throw new ValidationError(`Error in field ${key}: ${e.message}`);
const err = e as ValidationError;
throw new ValidationError(`Error in field ${key}: ${err.message}`);
}
}

Expand Down

0 comments on commit 5c881f0

Please sign in to comment.