This commit is contained in:
Spencer Ofwiti 2021-03-28 13:21:54 +03:00
parent 25fd616ff7
commit 16d476a2aa
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,6 @@ export class ErrorInterceptor implements HttpInterceptor {
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> { intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
return next.handle(request).pipe( return next.handle(request).pipe(
retry(1),
catchError((err: HttpErrorResponse) => { catchError((err: HttpErrorResponse) => {
let errorMessage; let errorMessage;
if (err.error instanceof ErrorEvent) { if (err.error instanceof ErrorEvent) {

View File

@ -72,7 +72,7 @@ class MutablePgpKeyStore implements MutableKeyStore{
} }
getPrivateKey(): any { getPrivateKey(): any {
return keyring.privateKeys.keys[0]; return keyring.privateKeys && keyring.privateKeys.keys[0];
} }
async isValidKey(key): Promise<boolean> { async isValidKey(key): Promise<boolean> {
@ -94,7 +94,8 @@ class MutablePgpKeyStore implements MutableKeyStore{
getFingerprint(): string { getFingerprint(): string {
// TODO Handle multiple keys // TODO Handle multiple keys
return keyring.privateKeys.keys[0].keyPacket.fingerprint; return keyring.privateKeys && keyring.privateKeys.keys[0] && keyring.privateKeys.keys[0].keyPacket &&
keyring.privateKeys.keys[0].keyPacket.fingerprint;
} }
getKeyId(key: any): string { getKeyId(key: any): string {