Skip to content

Commit

Permalink
refactor: in process of checking all packages
Browse files Browse the repository at this point in the history
Signed-off-by: Youngone Lee <youngone.lee@accenture.com>
  • Loading branch information
Leeyoungone committed Dec 30, 2021
1 parent 51a9446 commit cf89a63
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import { SetKeychainEntryEndpointV1 } from "./web-services/set-keychain-entry-en
import { HasKeychainEntryEndpointV1 } from "./web-services/has-keychain-entry-endpoint-v1";
import { DeleteKeychainEntryEndpointV1 } from "./web-services/delete-keychain-entry-endpoint-v1";
import axios from "axios";
import { RuntimeError } from "run-time-error";

export interface IPluginKeychainVaultOptions extends ICactusPluginOptions {
logLevel?: LogLevelDesc;
keychainId: string;
Expand Down Expand Up @@ -234,10 +232,12 @@ export class PluginKeychainVault implements IPluginWebService, IPluginKeychain {
if ((ex as any).response?.statusCode === HttpStatus.NOT_FOUND) {
return (null as unknown) as string;
} else {
throw new RuntimeError(
"unexpected exception with incorrect type",
JSON.stringify(ex),
);
if ((ex as any).response?.status === HttpStatus.NOT_FOUND) {
return (null as unknown) as string;
} else {
this.log.error(`Retrieval of "${key}" crashed:`, ex);
throw ex;
}
}
}
}
Expand All @@ -263,7 +263,12 @@ export class PluginKeychainVault implements IPluginWebService, IPluginKeychain {
if ((ex as any).response?.statusCode === HttpStatus.NOT_FOUND) {
return false;
} else {
throw new RuntimeError("unexpected exception with incorrect type");
if ((ex as any).response?.status === HttpStatus.NOT_FOUND) {
return false;
} else {
this.log.error(`Presence check of "${key}" crashed:`, ex);
throw ex;
}
}
}
}
Expand Down

0 comments on commit cf89a63

Please sign in to comment.