Skip to content

STF-2488: Fix README examples - #518

Open
oschwald wants to merge 4 commits into
mainfrom
greg/stf-2488-update-api-reference-documentation-on-minfraud
Open

oschwald wants to merge 4 commits into
mainfrom
greg/stf-2488-update-api-reference-documentation-on-minfraud

Conversation

@oschwald

@oschwald oschwald commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The shipping example in the README sent a phone verification time with a false verification result. The updated API reference says to send the time only when the result is true. This change removes the time from that example.
  • The two report transaction examples did not compile. They had no colon after the with statement and one space too many of indentation. The asynchronous example called async_client.report, but the context variable is client.
  • The Errors section named minfraud.HttpError. The package exports minfraud.HTTPError.

STF-2488

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated the documented HTTP error class name.
    • Revised the request example to omit shipping.phone_verification_time and corrected the indentation of the order dictionary.
    • Fixed syntax, indentation, and client calls in the synchronous and asynchronous report examples.

The shipping example sets the phone verification result to false.
The updated API reference says to send the verification time only
when the result is true.

STF-2488

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@oschwald
oschwald requested review from horgh and a balanced review from Copilot November 23, 2026 23:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

The README updates the documented HTTP error class, removes shipping.phone_verification_time from a request example, and corrects the order dictionary and synchronous and asynchronous report examples.

Changes: README documentation

Layer / File(s) Summary
Correct API examples
README.rst
The documented error class changes to minfraud.HTTPError. The shipping example omits phone_verification_time, and the order dictionary has corrected indentation. The synchronous and asynchronous report examples have corrected syntax and indentation. The asynchronous example calls client.report.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Other

Merge Risk: Minimal · up to 8810a

This is a documentation-only change that corrects README examples and the error class name. It has no runtime impact and is safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "STF-2488: Fix README examples" names the main change: the PR corrects README examples. It does not name the specific fixes (removed phone verification time, syntax and indentation fixes, cl…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "STF-2488: Fix README examples" names the main change: the PR corrects README examples. It does not name the specific fixes (removed phone verification time, syntax and indentation fixes, client.report call, HTTPError class name), but the title is related to the main change and is not overly misleading. The ticket prefix is acceptable, and the title is specific enough for a teammate scanning history to see the primary change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the README page
And fixes examples line by line
The braces sit in proper place
The calls now follow syntax fine
Then hops away, contented and neat

oschwald and others added 2 commits November 23, 2026 23:12
Both examples had no colon after the `with` statement and one space
too many of indentation. The asynchronous example called
`async_client.report`, but the context variable is `client`.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The package exports `minfraud.HTTPError`. `minfraud.HttpError` does
not exist.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@oschwald oschwald changed the title STF-2488: Remove verification time from failed example STF-2488: Fix README examples Nov 23, 2026
Copilot AI balanced review requested due to automatic review settings November 23, 2026 23:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

The closing brace of the `order` dictionary had one space too many.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 30, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional comments: 1

README.rst: 1

295-295: Minor · Functional Correctness · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Use continuation prompts in the report examples.

Both examples use >>> for lines inside compound statements. A Python console uses [REDACTED] for those lines, and doctest treats each >>> as a new statement. As written, the examples fail before they call report. Replace the continuation prompts with [REDACTED] in both blocks.

Also applies to: 310-310

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f638f476-fc01-4c5d-889f-3e9e1bc10bef
Commits

Reviewing files that changed from the base of the PR and between 9f71b26 and 8810aaf.

Files selected for processing: 1

  • README.rst

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants