mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 19:39:25 +00:00
Revert "feat(api): better errors and documentation"
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import path from "node:path";
|
||||
|
||||
import { TableName, TSecretFolders, TSecretsV2 } from "@app/db/schemas";
|
||||
import { ForbiddenRequestError } from "@app/lib/errors";
|
||||
import { UnauthorizedError } from "@app/lib/errors";
|
||||
import { groupBy } from "@app/lib/fn";
|
||||
import { logger } from "@app/lib/logger";
|
||||
|
||||
@@ -436,7 +436,7 @@ export const expandSecretReferencesFactory = ({
|
||||
const [secretKey] = entities;
|
||||
|
||||
if (!canExpandValue(environment, secretPath))
|
||||
throw new ForbiddenRequestError({
|
||||
throw new UnauthorizedError({
|
||||
message: `You are attempting to reference secret named ${secretKey} from environment ${environment} in path ${secretPath} which you do not have access to.`
|
||||
});
|
||||
|
||||
@@ -461,7 +461,7 @@ export const expandSecretReferencesFactory = ({
|
||||
const secretReferenceKey = entities[entities.length - 1];
|
||||
|
||||
if (!canExpandValue(secretReferenceEnvironment, secretReferencePath))
|
||||
throw new ForbiddenRequestError({
|
||||
throw new UnauthorizedError({
|
||||
message: `You are attempting to reference secret named ${secretReferenceKey} from environment ${secretReferenceEnvironment} in path ${secretReferencePath} which you do not have access to.`
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user