Skip to content

Commit

Permalink
add 'error' or 'message' to logged errors
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Dec 11, 2024
1 parent 8623974 commit b721005
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions application/common/components/passwordStore/Google.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ protected function getUserByEmployeeId($employeeId)
'employee_id' => $employeeId,
'email1' => $response['users'][0]['primaryEmail'],
'email2' => $response['users'][1]['primaryEmail'],
'error' => 'Multiple email addresses found in G Suite. Cannot resolve.',
]);
throw new \Exception(\Yii::t('app', 'Google.MultipleEmailsFound'), 1560875143);
}
Expand Down
6 changes: 5 additions & 1 deletion application/common/models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,11 @@ public function beforeSave($insert): bool
'hide' => $this->hide,
]);
} catch (\Exception $e) {
\Yii::error(['action' => 'personnel update', 'status' => 'error'], __METHOD__);
\Yii::error([
'action' => 'personnel update',
'status' => 'error',
'message' => $e->getMessage(),
], __METHOD__);
}
}

Expand Down

0 comments on commit b721005

Please sign in to comment.