Skip to content

Commit 521cc54

Browse files
committed
MOORe
1 parent 36f2aac commit 521cc54

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/server/src/bitbucket/bitbucket-file-provider.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ export class BitbucketFileProvider implements FileProvider {
5353
);
5454
}
5555

56+
if (err.name === "HTTPError") {
57+
err = err.status; // we don't want to expose the full error message since it contains credentials
58+
}
5659
log.error({ userId: user.id }, err);
5760
throw new Error(`Could not fetch ${path} of repository ${repository.owner}/${repository.name}: ${err}`);
5861
}
@@ -76,6 +79,9 @@ export class BitbucketFileProvider implements FileProvider {
7679
).data;
7780
return contents as string;
7881
} catch (err) {
82+
if (err.name === "HTTPError") {
83+
err = err.status; // we don't want to expose the full error message since it contains credentials
84+
}
7985
log.debug({ userId: user.id }, err);
8086
}
8187
}

0 commit comments

Comments
 (0)