Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Add action hook for logging 401 Pico API errors
Browse files Browse the repository at this point in the history
  • Loading branch information
amyevans committed Aug 2, 2021
1 parent b721eeb commit 3f9d0a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/integrations/class-pico.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ public function verify_pico_user_for_sso( array $user ) {

$response = $this->verification_request( $this->verify_user_path, $payload, $credentials );

// Provide a hook for logging that the API key is invalid.
if ( 401 === $response['status_code'] ) {
do_action( 'wp_irving_pico_api_key_invalid', $response );
}

if ( 200 !== $response['status_code'] ) {
return false;
}
Expand Down

0 comments on commit 3f9d0a4

Please sign in to comment.