- throw 'bad verb' if no verb is given in oai -request

- handleGetRecord: break if no identifier is given
- handleGetRecord: break if no metadataPrefix is given
- allow post and get for oai requests
This commit is contained in:
Arno Kaimbacher 2020-07-15 17:37:27 +02:00
parent 64faf73564
commit 4a6c69100a
4 changed files with 23 additions and 6 deletions

View file

@ -2,6 +2,8 @@
namespace App\Models\Oai;
use App\Exceptions\OaiModelException;
class OaiModelError
{
/**
@ -35,7 +37,7 @@ class OaiModelError
public static function mapCode($code)
{
if (false === array_key_exists($code, self::$oaiErrorCodes)) {
throw new Oai_Model_Exception("Unknown oai error code $code");
throw new OaiModelException("Unknown oai error code $code");
}
return self::$oaiErrorCodes[$code];
}