Open
Description
What happened?
When a specified file does not exist, getConfigFile() is supposed to return an emptyConfigResult object. But when the non-existent file is requested, octokit.request throws an error that has {...status: "404" }, while getConfigFile() is anticipating 404 (integer) instead of "404" (string), and so instead of returning emptyConfigResult, it instead throws the error.
What did you expect to happen?
I would expect that when a file does not exist, an emptyConfigResult object is returned.
What the problem might be
The test:
if (error.status === 404) {
return emptyConfigResult;
}
should instead be:
if (error.status === "404") {
return emptyConfigResult;
}