Move not-found handling from the query handler to the controller layer following DDD conventions: the handler now returns null when a listing is not found, and the controller maps that to NotFoundException (404). Key changes: - Handler returns ListingDetailData | null instead of throwing - Use ListingNotFoundSignal to prevent caching null results - Add `return await` to properly catch errors in try/catch - Controller throws NotFoundException with listing ID in message - Strengthen E2E test to assert exactly 404 (was [404, 400]) - Add unit tests: not-found returns null, unexpected error → 500 - Fix missing LoggerService mock in handler test Co-Authored-By: Paperclip <noreply@paperclip.ing>
5.8 KiB
5.8 KiB