Proje: Okul Platform · Hub: Okul Platform — Conventions
Özel Exception’lar
Checkout Exception’ları
CheckoutAlreadyCompletedException → 422
CheckoutAlreadyCancelledException → 422
CheckoutCannotBeModifiedException → 422
CheckoutCannotBeRejectedException → 422
CustomerPhoneNotFoundException → 422
Auth/User Exception’ları
LoginFailedException → 401 (inactiveUser())
PasswordMismatchException → 422
OtpRateLimitExceededException → 429
OTP Exception’ları
OtpCodeException → OTP genel hata
OtpDuplicateContactException → Aynı telefon/email birden fazla hesapta
OtpUserNotFoundException → Kullanıcı bulunamadı
Verification Exception’ları
AttemptLimitException → Çok fazla deneme
InvalidVerificationCodeException — Hatalı kod
RecordAlreadyVerifiedException — Zaten doğrulanmış
ResendTimeLimitException — Bekleme süresi
VerificationTimeExpiredException — Süre doldu
Usage Limit
UsageLimitExceededException → 402 Payment Required + {limited: true}
B2B portal’da içerik limiti aşıldığında fırlatılır. HTTP 402 kullanması dikkat çekici.
Media Exception’ları
MediaException → Medya genel hata
VideoException → Video genel hata
Lead Exception
LeadException → Lead genel hata
School Comment
SchoolCommentException → Yorum genel hata
Responsable Interface
Bazı exception’lar Illuminate\Contracts\Support\Responsable implement eder:
UsageLimitExceededException—toResponse()ile doğrudan HTTP yanıt döner
JsonResponse Hata Metodları
JsonResponse::error(message, status, additional)
JsonResponse::forbidden()
JsonResponse::unauthorized()Related
- api-response-structure — JsonResponse sınıfı
- api-auth-system — LoginFailedException
- api-checkout-flow — Checkout exception’ları