-
Notifications
You must be signed in to change notification settings - Fork 188
[Core] PSCID uniqueness #8411
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
[Core] PSCID uniqueness #8411
Changes from all commits
57dc72e
07c0423
a802995
ec8c975
00c8166
d584813
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -241,8 +241,14 @@ class Candidates extends Endpoint implements \LORIS\Middleware\ETagCalculator | |
| $pscid, | ||
| $project->getId() | ||
| ); | ||
| } catch (\LorisException | \InvalidArgumentException $e) { | ||
| return new \LORIS\Http\Response\JSON\BadRequest($e->getMessage()); | ||
| } catch (\ConflictException $e) { | ||
| return new \LORIS\Http\Response\JSON\Conflict( | ||
| $e->getMessage() | ||
| ); | ||
| } catch (\Exception | \LorisException | \InvalidArgumentException $e) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When is a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When PSCID is not provided and generation is user
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean that by adding \Exception I should remove the other two because they are subclasses?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That was my question, yes. |
||
| return new \LORIS\Http\Response\JSON\BadRequest( | ||
| $e->getMessage() | ||
| ); | ||
| } | ||
|
|
||
| $candidate = \NDB_Factory::singleton()->candidate($candid); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?php | ||
| /** | ||
| * This file contains the Conflict exception type. | ||
| * | ||
| * PHP Version 7 | ||
| * | ||
| * @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 | ||
| */ | ||
| class ConflictException extends LorisException | ||
| { | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.