Wikibase
MediaWiki Wikibase extension
|
Public Member Functions | |
__construct (string $code, string $message, array $context=[]) | |
getErrorCode () | |
getErrorMessage () | |
getErrorContext () | |
Static Public Member Functions | |
static | newInvalidValue (string $path) |
static | newPatchResultInvalidValue (string $path, $value) |
static | newMissingField (string $path, string $field) |
static | newMissingFieldInPatchResult (string $path, string $field) |
static | newValueTooLong (string $path, int $maxLength, bool $isPatchRequest=false) |
static | newInvalidKey (string $path, string $key) |
static | newPatchResultInvalidKey (string $path, string $key) |
static | newDataPolicyViolation (string $violationCode, array $violationContext) |
static | newPatchResultModifiedReadOnlyValue (string $path) |
static | newPermissionDenied (string $reason) |
static | newResourceNotFound (string $resourceType) |
static | newPatchResultResourceNotFound (string $path, string $value) |
Public Attributes | |
const | CANNOT_MODIFY_READ_ONLY_VALUE = 'cannot-modify-read-only-value' |
const | DATA_POLICY_VIOLATION = 'data-policy-violation' |
const | INVALID_KEY = 'invalid-key' |
const | INVALID_PATH_PARAMETER = 'invalid-path-parameter' |
const | INVALID_QUERY_PARAMETER = 'invalid-query-parameter' |
const | INVALID_VALUE = 'invalid-value' |
const | ITEM_NOT_FOUND = 'item-not-found' |
const | ITEM_REDIRECTED = 'redirected-item' |
const | ITEM_STATEMENT_ID_MISMATCH = 'item-statement-id-mismatch' |
const | MISSING_FIELD = 'missing-field' |
const | PATCH_RESULT_INVALID_KEY = 'patch-result-invalid-key' |
const | PATCH_RESULT_INVALID_VALUE = 'patch-result-invalid-value' |
const | PATCH_RESULT_MISSING_FIELD = 'patch-result-missing-field' |
const | PATCH_RESULT_MODIFIED_READ_ONLY_VALUE = 'patch-result-modified-read-only-value' |
const | PATCH_RESULT_REFERENCED_RESOURCE_NOT_FOUND = 'patch-result-referenced-resource-not-found' |
const | PATCH_RESULT_VALUE_TOO_LONG = 'patch-result-value-too-long' |
const | PATCH_TARGET_NOT_FOUND = 'patch-target-not-found' |
const | PATCH_TEST_FAILED = 'patch-test-failed' |
const | PATCHED_INVALID_SITELINK_TYPE = 'patched-invalid-sitelink-type' |
const | PATCHED_SITELINK_URL_NOT_MODIFIABLE = 'url-not-modifiable' |
const | PATCHED_STATEMENT_GROUP_PROPERTY_ID_MISMATCH = 'patched-statement-group-property-id-mismatch' |
const | PERMISSION_DENIED = 'permission-denied' |
const | PERMISSION_DENIED_REASON_UNAUTHORIZED_BOT_EDIT = 'unauthorized-bot-edit' |
const | PERMISSION_DENIED_REASON_PAGE_PROTECTED = 'resource-protected' |
const | PERMISSION_DENIED_REASON_USER_BLOCKED = 'blocked-user' |
const | PERMISSION_DENIED_UNKNOWN_REASON = 'permission-denied-unknown-reason' |
const | POLICY_VIOLATION_ITEM_LABEL_DESCRIPTION_DUPLICATE = 'item-label-description-duplicate' |
const | POLICY_VIOLATION_PROPERTY_LABEL_DUPLICATE = 'property-label-duplicate' |
const | POLICY_VIOLATION_LABEL_DESCRIPTION_SAME_VALUE = 'label-description-same-value' |
const | POLICY_VIOLATION_SITELINK_CONFLICT = 'sitelink-conflict' |
const | PROPERTY_NOT_FOUND = 'property-not-found' |
const | PROPERTY_STATEMENT_ID_MISMATCH = 'property-statement-id-mismatch' |
const | RESOURCE_NOT_FOUND = 'resource-not-found' |
const | SITELINK_TITLE_NOT_FOUND = 'title-does-not-exist' |
const | STATEMENT_GROUP_PROPERTY_ID_MISMATCH = 'statement-group-property-id-mismatch' |
const | UNEXPECTED_ERROR = 'unexpected-error' |
const | VALUE_TOO_LONG = 'value-too-long' |
const | CONTEXT_ACTUAL_VALUE = 'actual_value' |
const | CONTEXT_CONFLICTING_ITEM_ID = 'conflicting_item_id' |
const | CONTEXT_CONFLICTING_PROPERTY_ID = 'conflicting_property_id' |
const | CONTEXT_DESCRIPTION = 'description' |
const | CONTEXT_FIELD = 'field' |
const | CONTEXT_ITEM_ID = 'item_id' |
const | CONTEXT_KEY = 'key' |
const | CONTEXT_LABEL = 'label' |
const | CONTEXT_LANGUAGE = 'language' |
const | CONTEXT_LIMIT = 'limit' |
const | CONTEXT_PARAMETER = 'parameter' |
const | CONTEXT_PATH = 'path' |
const | CONTEXT_PROPERTY_ID = 'property_id' |
const | CONTEXT_REASON = 'reason' |
const | CONTEXT_REDIRECT_TARGET = 'redirect_target' |
const | CONTEXT_RESOURCE_TYPE = 'resource_type' |
const | CONTEXT_SITE_ID = 'site_id' |
const | CONTEXT_STATEMENT_GROUP_PROPERTY_ID = 'statement_group_property_id' |
const | CONTEXT_STATEMENT_ID = 'statement_id' |
const | CONTEXT_STATEMENT_PROPERTY_ID = 'statement_property_id' |
const | CONTEXT_TITLE = 'title' |
const | CONTEXT_VALUE = 'value' |
const | CONTEXT_VIOLATION = 'violation' |
const | CONTEXT_VIOLATION_CONTEXT = 'violation_context' |
const | EXPECTED_CONTEXT_KEYS |
Private Attributes | |
const | ADDITIONAL_PATH_CONTEXT |
Depending on the use case and whether it's operating on a single resource or a list, errors may include path information in the context. | |
string | $errorCode |
string | $errorMessage |
array | $errorContext |
Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::__construct | ( | string | $code, |
string | $message, | ||
array | $context = [] ) |
Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::getErrorCode | ( | ) |
Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::getErrorContext | ( | ) |
Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::getErrorMessage | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
string | $path | |
mixed | $value |
|
static |
|
static |
|
static |
|
static |
|
static |
|
private |
|
private |
|
private |
|
private |
Depending on the use case and whether it's operating on a single resource or a list, errors may include path information in the context.
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CANNOT_MODIFY_READ_ONLY_VALUE = 'cannot-modify-read-only-value' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_ACTUAL_VALUE = 'actual_value' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_CONFLICTING_ITEM_ID = 'conflicting_item_id' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_CONFLICTING_PROPERTY_ID = 'conflicting_property_id' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_DESCRIPTION = 'description' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_FIELD = 'field' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_ITEM_ID = 'item_id' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_KEY = 'key' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_LABEL = 'label' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_LANGUAGE = 'language' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_LIMIT = 'limit' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_PARAMETER = 'parameter' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_PATH = 'path' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_PROPERTY_ID = 'property_id' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_REASON = 'reason' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_REDIRECT_TARGET = 'redirect_target' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_RESOURCE_TYPE = 'resource_type' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_SITE_ID = 'site_id' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_STATEMENT_GROUP_PROPERTY_ID = 'statement_group_property_id' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_STATEMENT_ID = 'statement_id' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_STATEMENT_PROPERTY_ID = 'statement_property_id' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_TITLE = 'title' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_VALUE = 'value' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_VIOLATION = 'violation' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::CONTEXT_VIOLATION_CONTEXT = 'violation_context' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::DATA_POLICY_VIOLATION = 'data-policy-violation' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::EXPECTED_CONTEXT_KEYS |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::INVALID_KEY = 'invalid-key' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::INVALID_PATH_PARAMETER = 'invalid-path-parameter' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::INVALID_QUERY_PARAMETER = 'invalid-query-parameter' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::INVALID_VALUE = 'invalid-value' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::ITEM_NOT_FOUND = 'item-not-found' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::ITEM_REDIRECTED = 'redirected-item' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::ITEM_STATEMENT_ID_MISMATCH = 'item-statement-id-mismatch' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::MISSING_FIELD = 'missing-field' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCH_RESULT_INVALID_KEY = 'patch-result-invalid-key' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCH_RESULT_INVALID_VALUE = 'patch-result-invalid-value' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCH_RESULT_MISSING_FIELD = 'patch-result-missing-field' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCH_RESULT_MODIFIED_READ_ONLY_VALUE = 'patch-result-modified-read-only-value' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCH_RESULT_REFERENCED_RESOURCE_NOT_FOUND = 'patch-result-referenced-resource-not-found' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCH_RESULT_VALUE_TOO_LONG = 'patch-result-value-too-long' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCH_TARGET_NOT_FOUND = 'patch-target-not-found' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCH_TEST_FAILED = 'patch-test-failed' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCHED_INVALID_SITELINK_TYPE = 'patched-invalid-sitelink-type' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCHED_SITELINK_URL_NOT_MODIFIABLE = 'url-not-modifiable' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PATCHED_STATEMENT_GROUP_PROPERTY_ID_MISMATCH = 'patched-statement-group-property-id-mismatch' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PERMISSION_DENIED = 'permission-denied' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PERMISSION_DENIED_REASON_PAGE_PROTECTED = 'resource-protected' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PERMISSION_DENIED_REASON_UNAUTHORIZED_BOT_EDIT = 'unauthorized-bot-edit' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PERMISSION_DENIED_REASON_USER_BLOCKED = 'blocked-user' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PERMISSION_DENIED_UNKNOWN_REASON = 'permission-denied-unknown-reason' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::POLICY_VIOLATION_ITEM_LABEL_DESCRIPTION_DUPLICATE = 'item-label-description-duplicate' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::POLICY_VIOLATION_LABEL_DESCRIPTION_SAME_VALUE = 'label-description-same-value' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::POLICY_VIOLATION_PROPERTY_LABEL_DUPLICATE = 'property-label-duplicate' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::POLICY_VIOLATION_SITELINK_CONFLICT = 'sitelink-conflict' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PROPERTY_NOT_FOUND = 'property-not-found' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::PROPERTY_STATEMENT_ID_MISMATCH = 'property-statement-id-mismatch' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::RESOURCE_NOT_FOUND = 'resource-not-found' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::SITELINK_TITLE_NOT_FOUND = 'title-does-not-exist' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::STATEMENT_GROUP_PROPERTY_ID_MISMATCH = 'statement-group-property-id-mismatch' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::UNEXPECTED_ERROR = 'unexpected-error' |
const Wikibase\Repo\RestApi\Application\UseCases\UseCaseError::VALUE_TOO_LONG = 'value-too-long' |