Optionalbody: unknownOptionalurl: stringOptionalmethod: stringOptional ReadonlybodyThe full parsed JSON response body, when available.
Optional ReadonlycodeApplication error code from the response body, if present.
E.g. "INSUFFICIENT_FUNDS", "CALL_EXCEPTION".
Optional ReadonlymethodThe HTTP method (e.g. GET, POST), when available.
OptionalstackReadonlystatusHTTP status code (e.g. 500, 404).
Optional ReadonlyurlThe request URL, when available.
Thrown when creating a Policy that clashes with one already on the account. The backend permits only one policy per
type+chain, and returns a400with a "Duplicate policy type" message when that constraint is violated; the SDK surfaces that as this typed error.This is a subclass of ApiError (with
status === 400), so existingcatch (e) { if (e instanceof ApiError) ... }handlers continue to work; callers wanting to special-case the duplicate can check forDuplicatePolicyErrorspecifically.