Skip to content

Commit

Permalink
Print error message for more details (#38)
Browse files Browse the repository at this point in the history
* Add access rights info to readme.

* Print error message in main task for more details.

Co-authored-by: Mario Mann <[email protected]>
  • Loading branch information
mariomann and Mario Mann authored Jul 7, 2021
1 parent 180e918 commit e15c381
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ You can download the executable jars from [releases]( https://github.com/opsgeni
## Parameters
Options:
* --apiKey
Opsgenie Integration API Key. (API Key is mandatory)
Opsgenie Integration API Key. (API Key is mandatory)
+ Access Rights: [Read and Configuration Access](https://docs.opsgenie.com/docs/api-key-management#section-access-rights-)
* --backupPath
Backup directory
Default: /Users/baris/git/client-configuration-backup
+ Default: /Users/baris/git/client-configuration-backup
* --opsgenieHost
OpsGenie host to use
Default: https://api.opsgenie.com
+ Default: https://api.opsgenie.com
* --sshKeyPath
Ssh key path
* --sshPassPhrase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ public static void main(String[] args) throws Exception {
try {
final GetAccountInfoResponse info = accountApi.getInfo();
logger.info("Account name is " + info.getData().getName() + "\n");
logger.info("OpsGenie host is " + opsGenieHost + "\n");

ConfigurationExporter exporter = new ConfigurationExporter(properties, rateLimitManager);
exporter.export();

logger.info("Finished");
} catch (Exception e) {
logger.error("Could not connect to host: " + opsGenieHost);
logger.error("Could not finish task: " + e.getMessage());
System.exit(1);
}
}
Expand Down

0 comments on commit e15c381

Please sign in to comment.