diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-02-20 10:43:10 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-10-15 09:05:27 +0200 |
commit | ccec80259808a35cddaccf5cc5eaf420be064b10 (patch) | |
tree | 0038fc666c9782285838d6eb14160cabb410089b /mod/mod-ci-github.cxx | |
parent | e3c374f2d6c00df3031a804e508565a04b2f0407 (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; |