Skip to content

Log if theres a misconfigured code#3554

Open
dsubak wants to merge 1 commit intomainfrom
dansubak/202605_add_logs_for_misconfigured_codes
Open

Log if theres a misconfigured code#3554
dsubak wants to merge 1 commit intomainfrom
dansubak/202605_add_logs_for_misconfigured_codes

Conversation

@dsubak
Copy link
Copy Markdown
Contributor

@dsubak dsubak commented May 6, 2026

Description (What does it do?)

Adds a log message for the misconfiguration encountered here

Essentially, the code existed, but it was not linked up such that Discount.b2b_contracts() returned an empty list. In this codepath, that's not really expected, so it dropped through after performing no attachment and returned a 200. This doesn't change any of the behavior around the fallback, but it does provide visibility into what's happening for us.

Screenshots (if appropriate):

Code in question on production:
Screenshot 2026-05-05 at 5 18 39 PM

How can this be tested?

  • Add a contract in the admin page. I used the following minimal settings.
Screenshot 2026-05-06 at 12 36 33 PM - Visit `http://mitxonline.odl.local:9080/api/v0/b2b/attach/test/` and hit POST. - You should get back an empty list and in the web container's UI, we should see an error like the following: Screenshot 2026-05-06 at 12 39 27 PM

Additional Context

  • There's an open question as to whether or not we should expose the error to the user. I'm happy to add that if we feel that it's useful.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:
No changes detected

## Changes for v1.yaml:
No changes detected

## Changes for v2.yaml:
No changes detected

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

@dsubak dsubak marked this pull request as ready for review May 6, 2026 16:46
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.

1 participant