72 lines
No EOL
1.8 KiB
PHP
72 lines
No EOL
1.8 KiB
PHP
<?php // TODO: Fix the error-codes once it's been decided what they should be.
|
|
|
|
namespace FederationLib\Enums\Standard;
|
|
|
|
final class ErrorCodes
|
|
{
|
|
/**
|
|
* An internal server error occurred.
|
|
*/
|
|
public const INTERNAL_SERVER_ERROR = -1000;
|
|
|
|
/**
|
|
* The invoker does not have permission to perform the requested action.
|
|
*/
|
|
public const ACCESS_DENIED = -1001;
|
|
|
|
|
|
|
|
/**
|
|
* The requested client was not found.
|
|
*/
|
|
public const CLIENT_NOT_FOUND = 1000;
|
|
|
|
/**
|
|
* The requested client name is invalid.
|
|
*/
|
|
public const INVALID_CLIENT_NAME = 1001;
|
|
|
|
/**
|
|
* The requested client description is invalid.
|
|
*/
|
|
public const INVALID_CLIENT_DESCRIPTION = 1002;
|
|
|
|
/**
|
|
* The requested client signature verification failed.
|
|
*/
|
|
public const SIGNATURE_VERIFICATION_FAILED = 1003;
|
|
|
|
/**
|
|
* The requested client is disabled.
|
|
*/
|
|
public const CLIENT_DISABLED = 1004;
|
|
|
|
|
|
/**
|
|
* The given peer metadata is invalid or malformed.
|
|
*/
|
|
public const INVALID_PEER_METADATA = 2000;
|
|
|
|
public const PEER_METADATA_NOT_FOUND = 2001;
|
|
|
|
public const INVALID_FEDERATED_ADDRESS = 2002;
|
|
|
|
public const INVALID_PEER_ASSOCIATION_TYPE = 2003;
|
|
|
|
|
|
public const ALL = [
|
|
self::INTERNAL_SERVER_ERROR,
|
|
self::ACCESS_DENIED,
|
|
|
|
self::CLIENT_NOT_FOUND,
|
|
self::INVALID_CLIENT_NAME,
|
|
self::INVALID_CLIENT_DESCRIPTION,
|
|
self::SIGNATURE_VERIFICATION_FAILED,
|
|
self::CLIENT_DISABLED,
|
|
|
|
self::INVALID_PEER_METADATA,
|
|
self::PEER_METADATA_NOT_FOUND,
|
|
self::INVALID_FEDERATED_ADDRESS,
|
|
self::INVALID_PEER_ASSOCIATION_TYPE
|
|
];
|
|
} |