Changes:
1. Add explicit try-catch blocks around validateDockerComposeForInjection()
in API endpoints to return proper 422 JSON responses with validation errors
2. Rename $service_payload to $servicePayload for PSR-12 compliance (camelCase)
API endpoints now properly handle validation failures:
- One-click service creation (line 334)
- Custom compose service creation (line 480)
- Service update endpoint (line 808)
All return consistent error format:
{
"message": "Validation failed.",
"errors": {
"docker_compose_raw": "Invalid Docker Compose service name: ..."
}
}
Livewire components already have proper exception handling via handleError().
All 60 security tests pass (176 assertions).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| Api | ||
| Webhook | ||
| Controller.php | ||
| MagicController.php | ||
| OauthController.php | ||
| UploadController.php | ||