Skip to content
This repository was archived by the owner on Jul 15, 2024. It is now read-only.
This repository was archived by the owner on Jul 15, 2024. It is now read-only.

Improve shopware API client error handling #13

@MalteJanz

Description

@MalteJanz

The client should re-authenticate itself if it needs to (receives a "unauthenticated" response).

This is a little tricky to do properly, one must consider the following invariants:

  • there might be multiple requests running in parallel, ideally you only want to re-auth after the first failure and let the others wait for retry
  • the in_flight_semaphore locks reduce the maximum requests happening at the same time in most cases. We need to be careful to not cause a deadlock

Also the code itself could see some more love and refactoring to remove code duplication

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions