#29436 CustomCodeExecutionError from guardrail block surfaces as HTTP 500 instead of 400
## Description
When a `custom_code` guardrail (e.g. LLM Guard) detects a policy violation and blocks the request, the resulting `CustomCodeExecutionError` is not translated into a proper HTTP error response — it surfaces as **500 Internal Server Error** instead of **400 Bad Request** or **403 Forbidden**.
The guardrail is working correctly (the block is enforced), but the status code is wrong.
## Stack trace (from proxy logs)
``` File ".../litellm/llms/openai/chat/guardrail_translation/handler.py", line 111, in process_input_messages guardrailed_inputs = await guardrail_to_apply.apply_guardrail(...) File ".../litellm/integrations/custom_guardrail.py", line 949, in async_wrapper return self._process_error(e=e, ...)
CustomCodeExecutionError: Custom code guardrail execution failed: Content policy violation: PromptInjection
INFO: 127.0.0.1:43604 - "POST /v1/chat/completions HTTP/1.1" 500 Internal Server Error ```
## Expected behavior
A guardrail block should return **400** (or **403**), not **500**. The 5xx range implies a server fault; a content policy rejection is a client-side condition.
## Impact
- Callers cannot distinguish a guardrail block from a genuine proxy …