We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 59fba0f + 493a550 commit 7c66cc5Copy full SHA for 7c66cc5
1 file changed
src/api/context.ts
@@ -261,12 +261,14 @@ export class ApiContext {
261
*/
262
public get environmentContext(): { projId: string; envId: string } {
263
if (
264
- this._level !== ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY ||
+ this._contextLevel !== ApiContextLevel.ENVIRONMENT ||
265
this._project === null ||
266
this._environment === null
267
) {
268
throw new PermitContextError(
269
- `You cannot get environment context, current api context is: ${this._level.toString()}`,
+ `You cannot get environment context, current api context is: ${
270
+ ApiContextLevel[this._contextLevel]
271
+ }`,
272
);
273
}
274
return {
0 commit comments