Skip to content

Commit c22f0f1

Browse files
committed
improve error handling
1 parent c490e46 commit c22f0f1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

components/gong/actions/get-extensive-data/get-extensive-data.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default {
7979
const calls = await app.paginate({
8080
resourceFn: getExtensiveData,
8181
resourceFnArgs: {
82-
$,
82+
step: $,
8383
data: {
8484
filter,
8585
},
@@ -92,8 +92,14 @@ export default {
9292
$.export("$summary", `Successfully retrieved data for ${calls.length} calls`);
9393
}
9494
return calls;
95-
} catch {
96-
$.export("$summary", "No calls found matching the provided criteria");
95+
}
96+
catch (error) {
97+
const noCallsMessage = "No calls found corresponding to the provided filters";
98+
if (error?.message.includes(noCallsMessage)) {
99+
$.export("$summary", noCallsMessage);
100+
} else {
101+
throw new ConfigurationError(`${error?.message}`);
102+
}
97103
}
98104
},
99105
};

0 commit comments

Comments
 (0)