diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-02-20 10:43:10 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-06-05 09:12:45 +0200 |
commit | 9b1f5801eb0ae3524303b63b9b0d4cfee85867a9 (patch) | |
tree | 1328434c1c93b3cc04b9939e22e83f0341914b6f /mod/mod-ci-github.cxx | |
parent | 6a7e81b3d331c84633732d6b80d82fcbeb9eed44 (diff) |
JWT: OpenSSL error handling
Diffstat (limited to 'mod/mod-ci-github.cxx')
-rw-r--r-- | mod/mod-ci-github.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index 53ec9a7..7a641a0 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -73,6 +73,7 @@ // the webhook request to restrict access, otherwise we get access to all // repos covered by the installation if installed on an organisation for // example. +// using namespace std; using namespace butl; @@ -245,20 +246,11 @@ handle (request& rq, response& rs) chrono::minutes (options_->ci_github_jwt_validity_period ()), chrono::seconds (60))); - if (jwt.empty ()) - fail << "unable to generate JWT: " << options_->openssl () - << " failed"; - cout << "JWT: " << jwt << endl; } catch (const system_error& e) { - fail << "unable to generate JWT: unable to execute " - << options_->openssl () << ": " << e.what (); - } - catch (const std::exception& e) - { - fail << "unable to generate JWT: " << e; + fail << "unable to generate JWT: [" << e.code () << "] " << e.what (); } return true; |