Repository navigation
fix(deposits): a failed pricing-request lookup no longer creates a ticket-level draft - #1191
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…cket-level draft createDepositNoticeDraft swallowed a failed listForTicket and fell through to the ticket-level createDraft, so a network blip on a PCR deal built the deposit notice from the wrong source. The error now propagates: the caller's onError shows it and nothing is created. A deal with no pricing requests still takes the ticket-level route. (Release review of #1190, 2026-10-29.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
waritctd
force-pushed
the
fix/release-review-2026-10-29
branch
from
October 29, 2026 03:17
ac5309a to
6c13ec6
Compare
This branch was successfully deployed
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.
This is the fix for finding 2 from the code review of the release PR #1190.
Before this change,
createDepositNoticeDraftswallowed a failedapi.pricingRequests.listForTicketand fell through toapi.depositNotices.createDraft. So a brief network error on a pricing-request deal created the deposit notice from the ticket-level route instead of from the accepted quotation. Now the error propagates: the caller'sonErrorshows the toast and nothing is created.Findings 1 and 3 needed no change:
CANCELLEDkind thatDealQuotationService.cancelalready uses when a single quotation is cancelled, and nothing reads that kind as "the deal was cancelled".Tests (written first, shown red)
DepositNoticePage.test.jsx: the existing test "falls back to the ticket-level route when resolving pricing requests fails" is rewritten as "surfaces the error and creates nothing when resolving pricing requests fails". It checks that the error toast is shown, and that neithercreateDraftnorcreateDepositNoticeFromQuotationis called.expected "vi.fn()" to be called with arguments: [ 'error', 'network error' ].createDepositNoticeFromQuotation, and a deal with no accepted request goes tocreateDraft.onError. It has no separate test for this.Targeted run:
src/features/depositsandTicketDetailPage.test.jsx, 215 tests pass. eslint is clean.🤖 Generated with Claude Code