Namex API shows Errors in the Logs - receipts endpoint
- Dominant language
- JavaScript
- Stars
- 23
- Forks
- 62
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
from log August 26th:
2026-08-26 23:43:33.638 PDT POST 500 201 B 426 ms python-requests 2.32.5
**https://namex-api-prod-698952081000.northamerica-northeast1.run.app/api/v1/payments/760566/receipt**
Error Traceback (most recent call last):
File "/code/namex/services/payment/receipts.py", line 35, in get_receipt
return ReceiptResponse(**api_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pydantic/dataclasses.py", line 332, in new_init
self.__pydantic_validate_values__()
File "/usr/local/lib/python3.12/site-packages/pydantic/dataclasses.py", line 447, in _dataclass_validate_values
raise validation_error
pydantic.error_wrappers.ValidationError: 2 validation errors for ReceiptResponse
invoiceNumber
none is not an allowed value (type=type_error.none.not_allowed)
receiptNumber
none is not an allowed value (type=type_error.none.not_allowed)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/code/namex/resources/payment/payment_receipt.py", line 56, in post
receipt_info = get_receipt(payment.payment_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/code/namex/services/payment/receipts.py", line 38, in get_receipt
raise SBCPaymentException(err)
namex.services.payment.exceptions.SBCPaymentException: SBC Pay API exception.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with services/payment/receipts.py at get_receipt and resources/payment/payment_receipt.py at post, then inspect the reported receipts endpoint and its ReceiptResponse validation. Trace how null invoiceNumber and receiptNumber are handled and identify the intended behavior for this response. Done should include a regression test showing the endpoint handles this Pay API result without the logged exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 48/100