fix(backend-github-graphql): return empty array on non existent folder (#3079)

When starting a new project, usually collection folders don't exist in the repo. This is a legitimate use case and not an error.
This commit is contained in:
Erez Rokah 2020-01-13 17:06:35 +02:00 committed by GitHub
parent 93df614203
commit 69b130a3f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,7 +216,7 @@ export default class GraphQLAPI extends API {
const allFiles = this.getAllFiles(data.repository.object.entries, path);
return allFiles;
} else {
throw new APIError('Not Found', 404, 'GitHub');
return [];
}
}