Skip to content

fix: show detailed error messages for shipment cancellation #972

Merged
danh91 merged 1 commit intopatch-2026.1.13from
fix/shipment-cancel-error-message-clean
Feb 20, 2026
Merged

fix: show detailed error messages for shipment cancellation #972
danh91 merged 1 commit intopatch-2026.1.13from
fix/shipment-cancel-error-message-clean

Conversation

@Ansh-Dev-Nagar
Copy link
Collaborator

Summary

  • Shipment cancel and status change toasts were showing generic "Failed to cancel shipment" because RequestError stores details in error.data, not error.message
  • Now uses errorToMessages from @karrio/lib to extract the actual API error (e.g., "Please cancel this shipment pickup before")
  • Tested for correct error messages

@danh91 danh91 changed the base branch from main to patch-2026.1.13 February 20, 2026 23:49
@danh91 danh91 merged commit c82d475 into patch-2026.1.13 Feb 20, 2026
12 of 14 checks passed
@danh91 danh91 deleted the fix/shipment-cancel-error-message-clean branch February 20, 2026 23:49
danh91 added a commit that referenced this pull request Feb 21, 2026
* fix: show detailed error messages for shipment cancellation and status changes (#972)

* fix: use correct SendReturnToAddress field name in Landmark ImportRequest

The ImportRequest path was using ReturnAddress= which was silently
swallowed by **kwargs_ in the GenerateDS constructor, causing return
address to be omitted from the XML output.

* fix: make shipment is_return field nullable to prevent IntegrityError

The is_return column was NOT NULL which caused IntegrityError when
creating shipments through code paths that don't explicitly set this
field. Making it nullable with default=False resolves the production
constraint violation.

* release: 2026.1.13

---------

Co-authored-by: Ansh dev nagar <anshdevnagar@gmail.com>
danh91 pushed a commit that referenced this pull request Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants