Skip to content

Commit 0a59fb1

Browse files
authored
fix: throws error instead of returning undefined (MAPCO-2988) (#26)
* fix: throws error instead of returning undefined * chore: removed undefined
1 parent 7d28f03 commit 0a59fb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jobManagerClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class JobManagerClient extends HttpClient {
7676
}
7777
}
7878

79-
public async getJob<T, P>(jobId: string, shouldReturnTasks = false): Promise<IJobResponse<T, P> | undefined> {
79+
public async getJob<T, P>(jobId: string, shouldReturnTasks = false): Promise<IJobResponse<T, P>> {
8080
const getJobUrl = this.getJobUrl(jobId);
8181
try {
8282
this.logger.debug({
@@ -96,7 +96,7 @@ export class JobManagerClient extends HttpClient {
9696
msg: `failed to getJob for jobId=${jobId}`,
9797
errorMessage: (err as { message: string }).message,
9898
});
99-
return undefined;
99+
throw err;
100100
}
101101
}
102102

0 commit comments

Comments
 (0)