본문으로 건너뛰기
이 페이지는 아직 사용자의 언어로 번역되지 않았거나 번역이 기술 검토를 기다리고 있습니다. 아래에는 영어 원문이 표시됩니다. 영어 페이지 열기

E1704. Approvals not configured

Severity: ERROR. Class: HITLNotConfiguredError (subclass of RuntimeError). Stable code: E1704.

What happened​

POST /api/approval-requests returned a 404, meaning approvals are not configured at any scope the request could address (API key, project, or org). The SDK maps this 404 to HITLNotConfiguredError.

This is distinct from E1500: E1500 means approvals are configured at a scope but turned off; E1704 means approvals are not configured at all.

Why it matters​

Approvals only run once an administrator opts in. With nothing configured at any scope, there is no toggle to evaluate and the SDK falls through to the original deny.

How to fix​

Configure approvals at the scope you want to govern. In the dashboard, open Settings -> Approvals and turn the toggle on for the org, a project, or a specific API key. See Approval settings and cascade for how the cascade resolves the effective toggle.

Catching this error​

Python​

from controlzero import Client
from controlzero.errors import HITLNotConfiguredError

client = Client()
decision = client.guard("Bash:sudo apt-get install foo")
try:
pending = client.request_approval(decision)
except HITLNotConfiguredError:
print("Approvals are not configured. Turn the toggle on in the dashboard.")

Node​

import { Client, HITLNotConfiguredError } from '@controlzero/sdk';

const client = new Client();
const decision = await client.guard('Bash:sudo apt-get install foo');
try {
const pending = await client.requestApproval(decision);
} catch (err) {
if (err instanceof HITLNotConfiguredError) {
console.log('Approvals are not configured. Turn the toggle on in the dashboard.');
}
}

See also​