Expose bioPolicy errors in app-server v2 (#62176)

## Why

App-server clients received the generic `other` error code for biology
policy errors, so they couldn't distinguish them by code.

## What changed

Map the core `BioPolicy` error to `bioPolicy` in app-server v2 and include
the new value in the generated JSON schemas, TypeScript types, and Python
SDK enum.

## Testing

Update the error conversion test to assert that `BioPolicy` serializes as
`"bioPolicy"`.

GitOrigin-RevId: 77fa969a3d8cbd4c12fe6f7aa5d4833f6adaa99b
This commit is contained in:
Owen Lin
2026-11-18 03:37:23 +00:00
committed by copyberry
parent fc25d8f120
commit 9f80bb5957
25 changed files with 24 additions and 3 deletions
@@ -269,6 +269,7 @@
"modelNotFound",
"policyCapacityUnavailable",
"cyberPolicy",
"bioPolicy",
"misalignmentPolicyViolation",
"tooManyDenials",
"internalServerError",