Repository navigation
feat(order-service): busy and closed restaurants return clear 409s; cart items carry the photo - #287
Merged
Merged
Conversation
…art items carry the photo Owner decision: a BUSY restaurant takes no new orders. Checkout answers 409 RestaurantBusy (try again in a few minutes) or 409 RestaurantClosed with details.restaurantStatus, creating nothing and keeping the cart. Cart items now carry the menu item's imageUrl, refreshed silently at validation. Business rule, service docs, OpenAPI, current state and an E2E check updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the owner decision that a BUSY restaurant takes no new orders, with errors the apps can tell apart, and gives cart items their photo for the redesigned cart.
Related issue
Closes #286
Changes made
shared:RestaurantUnavailableError→409 RestaurantBusy(BUSY: "try again in a few minutes") or409 RestaurantClosed(CLOSED, SUSPENDED), withdetails.restaurantStatus.order-service: checkout throws it instead of400 Restaurant is currently closed. No order, outbox event or payment; the cart is kept.cart-service: cart items carryimageUrlfrom menu-service, set on add and refreshed at validation without counting as a cart change.docs/business/restaurant-availability.md, the decision in the roadmap,docs/services/order-service.md,docs/services/cart-service.md,.project-context/16-current-state.md, OpenAPI (RestaurantUnavailableErroronPOST /orders).409 RestaurantBusy, the cart is kept and no order is created → reopened, and the main flow continues.Testing performed
npm run verify(lint, all workspace tests, build) passes.npm run openapi:validatepasses.Breaking changes
POST /ordersfor a restaurant that isn't OPEN is now409instead of400. The customer app handles both codes in its matching PR.Documentation changes
See above.
Checklist
Generated by Claude Code