diff --git a/packages/nodes-base/nodes/Github/Github.node.ts b/packages/nodes-base/nodes/Github/Github.node.ts
index 5b31d53db6..fcde43f111 100644
--- a/packages/nodes-base/nodes/Github/Github.node.ts
+++ b/packages/nodes-base/nodes/Github/Github.node.ts
@@ -507,7 +507,7 @@ export class Github implements INodeType {
typeOptions: {
searchListMethod: 'getUsers',
searchable: true,
- searchFilterRequired: true,
+ searchFilterRequired: false,
},
},
{
@@ -1705,7 +1705,9 @@ export class Github implements INodeType {
maxValue: 100,
},
default: 50,
- description: 'Max number of results to return',
+ // eslint-disable-next-line n8n-nodes-base/node-param-description-wrong-for-limit
+ description:
+ 'Max number of results to return. Maximum value is 100.',
},
{
displayName: 'Filters',
diff --git a/packages/nodes-base/nodes/Github/SearchFunctions.ts b/packages/nodes-base/nodes/Github/SearchFunctions.ts
index 648d82e628..be85c2fb73 100644
--- a/packages/nodes-base/nodes/Github/SearchFunctions.ts
+++ b/packages/nodes-base/nodes/Github/SearchFunctions.ts
@@ -37,13 +37,23 @@ export async function getUsers(
): Promise {
const page = paginationToken ? +paginationToken : 1;
const per_page = 100;
- const responseData: UserSearchResponse = await githubApiRequest.call(
- this,
- 'GET',
- '/search/users',
- {},
- { q: filter, page, per_page },
- );
+
+ let responseData: UserSearchResponse = {
+ items: [],
+ total_count: 0,
+ };
+
+ try {
+ responseData = await githubApiRequest.call(
+ this,
+ 'GET',
+ '/search/users',
+ {},
+ { q: filter, page, per_page },
+ );
+ } catch {
+ // will fail if the owner does not have any users
+ }
const results: INodeListSearchItems[] = responseData.items.map((item: UserSearchItem) => ({
name: item.login,