Skip to content

Commit

Permalink
Print additional error message
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrommen committed Jan 16, 2023
1 parent 513c9b7 commit 8653dee
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion inc/class-response-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,17 @@ private function _process_response( $args, $assoc_args ) {

$saml = process_response();
if ( is_wp_error( $saml ) ) {
WP_CLI::error( $saml );
WP_CLI::error( $saml, false );

$saml = instance();
if ( $saml ) {
$error = $saml->getLastErrorReason();
if ( $error ) {
WP_CLI::print_value( $error );
}
}

exit( 1 );
}

return $saml;
Expand Down

0 comments on commit 8653dee

Please sign in to comment.