Open andy-crain-kr opened 2 months ago
Can you provide details on your environment? It seems that in some environments, like Google Cloud Functions, status codes are returned as strings
According to the spec, status codes are supposed to be integers
@andy-crain-kr
Do you use gcf?
@wolfy1339, @Uzlopak, no this is in a self-hosted kubernetes cluster.
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:
should instead be: