Skip to content

Missing access_token from header on retry #84

@tsayeed

Description

@tsayeed

Whenever retry is triggered for HttpLib.get or HttpLib.post, the api call via requests is missing the Authorization header.

Steps to Reproduce

  1. Simulate error response from marketo via mocking or rate limit
  2. Log/Debug the headers sent on requests.post/requests.get
  3. Confirm that the first request contains Authorization header but the subsequent retries don't

Root Cause
In

access_token = args.pop('access_token')
, we are popping the args dictionary. This mutates the original param. So, on subsequent retries inside the retry decorator, the call to get/post function no longer passes the access_token inside args.

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