feat: better api errors

This commit is contained in:
Daniel Hougaard
2024-09-17 22:53:51 +04:00
parent 10e7999334
commit 1c5a8cabe9
5 changed files with 103 additions and 14 deletions
@@ -512,7 +512,11 @@ export const secretImportServiceFactory = ({
return importedSecrets;
}
if (!botKey) throw new BadRequestError({ message: "Project bot not found", name: "bot_not_found_error" });
if (!botKey)
throw new BadRequestError({
message: "Project bot not found. Please upgrade your project.",
name: "bot_not_found_error"
});
const importedSecrets = await fnSecretsFromImports({ allowedImports, folderDAL, secretDAL, secretImportDAL });
return importedSecrets.map((el) => ({