Skip to content
Snippets Groups Projects
Commit 86598c7c authored by Dorian Merz's avatar Dorian Merz Committed by Frank Morgner
Browse files

refs #12986-master

* enhances paiaLogin error handling
* surpasses VF4-policy of patronLogin returning null on login fail
* mixed commit, TODO: sort out instance and finc-master parts
parent fc048119
Branches
Tags
No related merge requests found
......@@ -65,6 +65,8 @@ class PAIA extends \VuFind\ILS\Driver\PAIA
const SCOPE_WRITE_ITEMS = 'write_items';
const SCOPE_CHANGE_PASSWORD = 'change_password';
protected $last_error = null;
/**
* Constructor
*
......@@ -401,6 +403,7 @@ class PAIA extends \VuFind\ILS\Driver\PAIA
// error code 403 two differing errors are possible
// (cf. http://gbv.github.io/paia/paia.html#request-errors)
if (isset($array['error'])) {
$this->last_error = $array;
switch ($array['error']) {
// cf. http://gbv.github.io/paia/paia.html#request-errors
// error code error_description
......@@ -1258,4 +1261,8 @@ class PAIA extends \VuFind\ILS\Driver\PAIA
}
return false;
}
public function getLastError() {
return $this->last_error;
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment