feat: more fluent vuejs app error handler

This commit is contained in:
2025-12-15 19:45:53 +03:00
parent 9870f2f363
commit 955747334d
4 changed files with 70 additions and 5 deletions

View File

@@ -14,7 +14,10 @@ class CustomExceptionHandler implements ExceptionHandlerInterface
public function respond(Throwable $exception): ?JsonResponse
{
if ($exception instanceof TelegramInvalidSignatureException) {
return new JsonResponse(['error' => 'Invalid Signature'], Response::HTTP_BAD_REQUEST);
return new JsonResponse([
'error' => 'Invalid Signature',
'code' => 'NO_INIT_DATA',
], Response::HTTP_BAD_REQUEST);
}
return null;