Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for searches, ajax, waypoints, easyrdf HTTP client errors #1197

Merged
merged 9 commits into from
Sep 9, 2021
Prev Previous commit
Next Next commit
fail fast with an error page instead of skipping unknown vocabularies
osma committed Sep 9, 2021
commit 2d5f1ee3f6f7c7ca7151bca3bf8dd046cad83942
9 changes: 6 additions & 3 deletions controller/WebController.php
Original file line number Diff line number Diff line change
@@ -332,9 +332,12 @@ public function invokeGlobalSearch($request)
try {
$vocabObjects[] = $this->model->getVocabulary($vocid);
osma marked this conversation as resolved.
Show resolved Hide resolved
} catch (ValueError $e) {
// skip vocabularies not found in configuration
// please note that this may result in global search
// NB: should not happen in normal UI interaction
// fail fast with an error page if the vocabulary cannot be found
if ($this->model->getConfig()->getLogCaughtExceptions()) {
error_log('Caught exception: ' . $e->getMessage());
}
header("HTTP/1.0 400 Bad Request");
return $this->invokeGenericErrorPage($request, $e->getMessage());
}
}
}