fix(booking): 交易內只攔截業務例外,資料庫錯誤改交由例外處理器 #75

Merged
a620906209 merged 2 commits from fix/booking-exception-handling-impl into master 2026-10-17 17:38:44 +00:00
2 changed files with 48 additions and 47 deletions
Showing only changes of commit 8042f0bafb - Show all commits
@@ -8,8 +8,8 @@ use App\Exceptions\BookingRuleViolationException;
use App\Http\Controllers\Controller;
use App\Models\Booking;
use App\Models\CourseSchedule;
use App\Notifications\BookingCreatedNotification;
use App\Notifications\BookingCancelledNotification;
use App\Notifications\BookingCreatedNotification;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
@@ -158,6 +158,7 @@ class MemberBookingController extends Controller
private function formatBooking(Booking $b): array
{
$offer = $b->schedule?->divingOffer;
return [
'id' => $b->id,
'offer_id' => $offer?->id,