jberger / Mojo-ACME

Mojo-based ACME-protocol client
10 stars 5 forks source link

Mojo::Transaction::success was deprecated in Mojolicious 8.02 #12

Open s1037989 opened 5 years ago

fskale commented 5 years ago

Hi Stefan, do you think, that $tx->result is sufficient ? The result also can be "is_error" so the original code catched $res->success which can be translated into $result->is_success. Also the $result has to be evaluated. The doc of Mojo::Transaction clearly states:

Returns the Mojo::Message::Response object from "res" or dies if a
    connection error has occurred.

As for my understanding you have to use "eval" to catch any error other than $result->is_error. Perhaps Joel can clear things up.

Best regards Franz