{"section":"known-issues","requestedLocale":"en","requestedSlug":"giftcard-hub-timeout-returned-as-401-unauthorized","locale":"en","slug":"giftcard-hub-timeout-returned-as-401-unauthorized","path":"docs/en/known-issues/Payments/giftcard-hub-timeout-returned-as-401-unauthorized.md","branch":"main","content":"## Summary\n\nWhen a request to the Giftcard Hub provider times out, the Giftcard Hub returns a `401 Unauthorized` error to the requester instead of an appropriate timeout-related status code. This misleading response makes it difficult to correctly diagnose the root cause of payment failures involving gift cards.\n\nThe errors observed on the interaction transaction log are in the following routes:\n\n- `https://janus-payments-link.vtex.com.br//giftcardproviders/{provider}/giftcards/{giftcard}`\n- `https://janus-payments-link.vtex.com.br//giftcardproviders`\n\n## Simulation\n\nAny checkout flow using a gift card via the Giftcard Hub where the provider's response exceeds 15 seconds.\n\n**Steps to reproduce:**\n\n1. Add a product to the cart and proceed to checkout.\n2. At the payment step, select a gift card as the payment method.\n3. Complete the checkout so that the Giftcard Hub sends a request to the gift card provider.\n4. If the provider does not respond within **15 seconds**, the Giftcard Hub cancels the request and returns `401 Unauthorized` instead of a timeout-related error.\n5. Check the Giftcard logs for the following message to confirm the root cause:\n\n    The request was canceled due to the configured HttpClient.Timeout of 15 seconds elapsing.\n\n## Workaround\n\nThere is no workaround available."}