Skip to content

Commit 322b411

Browse files
fix: misuse of promise
Signed-off-by: Ar Rakin <[email protected]>
1 parent 4801c13 commit 322b411

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/typescript/services/InterProcessCommunicationService.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,13 @@ class InterProcessCommunicationService extends Service {
120120
private async loadExtension(
121121
request: Extract<IPCRequest, { type: IPCRequestType.LoadExtension }>
122122
): Promise<IPCResponse> {
123-
if (!access(request.file)) {
123+
try {
124+
await access(request.file);
125+
} catch (error) {
124126
return {
125127
type: IPCResponseType.IPCError,
126-
message: "Cannot access file."
128+
message: "Cannot access file.",
129+
data: error
127130
};
128131
}
129132

0 commit comments

Comments
 (0)