Skip to content

Commit

Permalink
Error when no translation is available.
Browse files Browse the repository at this point in the history
  • Loading branch information
okaycj committed Oct 8, 2024
1 parent fbf9e62 commit 45bf9be
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/record/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,15 @@ export class ImageNotFoundError extends Error {
super(`"${id}" image not found.`);
}
}

/** Error throw what specified language isn't found */
export class TranslationNotFoundError extends Error {
/**
* This will be thrown when attempting to init i18n
*
* @param baseName - Language a2code with region
*/
public constructor(baseName: string) {
super(`"${baseName}" translation not found.`);
}
}

0 comments on commit 45bf9be

Please sign in to comment.