Skip to content

response.headers is not iterable error #445

Open
@yaronya

Description

@yaronya

Hi,

I'm using @octokit/rest as my GH rest client and I found a possible bug in

for (const keyAndValue of response.headers) {
where I use a fetch wrapper that return headers as a non-iterable object. In that case, @octokit/request throws an error saying response.headers is not iterable.

I'd expect the package to iterate the headers attribute only if it exists and is iterable...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Up for grabsIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedhacktoberfestIssues for participation in Hacktoberfest

    Type

    No type

    Projects

    Status

    🔥 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions