Skip to content

Remove verbose log.error from sp api base client - #2082

Closed
marco-milanesi-momox wants to merge 1 commit into
saleweaver:masterfrom
marco-milanesi-momox:remove-log-error-from-sp-api-base-client
Closed

marco-milanesi-momox wants to merge 1 commit into
saleweaver:masterfrom
marco-milanesi-momox:remove-log-error-from-sp-api-base-client

Conversation

@marco-milanesi-momox

@marco-milanesi-momox marco-milanesi-momox commented Oct 27, 2026 •

Copy link
Copy Markdown

Related issue #2081

Hey @saleweaver 👋

If this change is welcome, to which branch should I point to instead of master?
Thank you! 🙇

Summary by Sourcery

Enhancements:

  • Remove verbose error-response logging from the SP API base client while preserving exception handling.

@sourcery-ai

sourcery-ai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The pull request removes the verbose log.error emitted for API error responses, relying on the existing typed exception and propagated response context for error handling.

File-Level Changes

Change Details Files
Remove redundant error-level logging while preserving exception-based response handling.
  • Stop logging the parsed API error payload in the response validation path.
  • Continue mapping the HTTP status to the corresponding exception and raising it with the error payload and response headers.
sp_api/base/client.py

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@saleweaver

Copy link
Copy Markdown
Owner

Hi, the branch you created the pull request from is very old, can you please create a PR from latest

@marco-milanesi-momox

marco-milanesi-momox commented Oct 27, 2026 •

Copy link
Copy Markdown
Author

hi @saleweaver we are using a very old python sp api release v1.9.60 as mentioned in the issue #2081

Alternatively, do you think it would be safe for us to bump to the latest v2 or there can be incompatibilities between v1 and latest v2 since it is a major version?

Thank you

@saleweaver

Copy link
Copy Markdown
Owner

You should be able to migrate without a problem, I haven't heard of any problems since v2 is out

@marco-milanesi-momox

Copy link
Copy Markdown
Author

Morning @saleweaver
One last question 🙏

Are you still maintaining v1? If yes, are you planning to backport to v1 some changes from v2?

Thanks for the patience!

@saleweaver

Copy link
Copy Markdown
Owner

v1 is unmaintained. If you need to support v1 still, we can discuss paid support.

@marco-milanesi-momox

Copy link
Copy Markdown
Author

Thank you for the info! 👍
I'll close this PR since v1 is unmaintained and I'll close also the related issue.

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