Skip to content

Commit 471bb25

Browse files
committed
update response codes
1 parent bd2d5d9 commit 471bb25

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/services/GithubService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ export class GithubService {
3838
const [method, token] = authorization.split(' ');
3939

4040
if (!method || !token) {
41-
throw new TerraformError(400);
41+
throw new TerraformError(401);
4242
}
4343

4444
if (lowerCase(method) !== 'basic') {
4545
console.warn(`Method ${method} is not 'basic'`);
46-
throw new TerraformError(400);
46+
throw new TerraformError(401);
4747
}
4848

4949
const decoded = Buffer.from(token, 'base64').toString('utf8');
@@ -56,7 +56,7 @@ export class GithubService {
5656

5757
if (!password) {
5858
console.warn(`Missing password from authorization token`);
59-
throw new TerraformError(400);
59+
throw new TerraformError(401);
6060
}
6161

6262
if (username) {

0 commit comments

Comments
 (0)