Skip to content

'res.txt()' in index.js file #69

@rmohl

Description

@rmohl

I was working with this repo and got an error that said "res.txt() is not a function". After debugging a bit, I eventually changed 'res.txt()' to 'res.text()' and this fixed my issue. Is it possible that this is a typo?

It's in file index.js in the function unsuccessfulResponseCheck(), on line 976. Here's a snippet of the code:

const e = new Error();
e.statusCode = res.status;
const body = util.isJsonResponse(res) ? res.json() : res.txt();

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions