File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
components/server/src/bitbucket Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments