Adding wrong credentials error message
This commit is contained in:
parent
bbf9b0c008
commit
709c4646ca
2
index.js
2
index.js
@ -85,6 +85,8 @@ var SecureFile = /** @class */ (function () {
|
||||
//TODO probably better fail check
|
||||
throw new NoConnection();
|
||||
case 4:
|
||||
if (code_res.status == 403)
|
||||
throw new Error("Unauthorized");
|
||||
statusParser(code_res);
|
||||
return [4 /*yield*/, code_res.json()];
|
||||
case 5:
|
||||
|
1
index.ts
1
index.ts
@ -47,6 +47,7 @@ export default class SecureFile {
|
||||
//TODO probably better fail check
|
||||
throw new NoConnection();
|
||||
}
|
||||
if (code_res.status == 403) throw new Error("Unauthorized");
|
||||
statusParser(code_res);
|
||||
let code = (await code_res.json()).code;
|
||||
let r = new rsa(this.PrivateKey, "pkcs1-pem");
|
||||
|
Reference in New Issue
Block a user