We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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; }
The text was updated successfully, but these errors were encountered:
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
Sorry, something went wrong.
@andy-crain-kr
Do you use gcf?
@wolfy1339, @Uzlopak, no this is in a self-hosted kubernetes cluster.
No branches or pull requests
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:
The text was updated successfully, but these errors were encountered: