PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.12
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.12
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Modules / MCP / Support / ErrorCodes.php

ErrorCodes.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.12, at app/Modules/MCP/Support/ErrorCodes.php

56 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Modules\MCP\Support;
4
5 defined('ABSPATH') || exit;
6
7 /**
8 * The closed set of machine-readable error codes the MCP tools return.
9 *
10 * Every MCPHelper::error() call uses one of these constants so the agent-facing
11 * error contract lives in one place — auditable, typo-proof, and stable for a
12 * client to branch on. Add a code here before using it.
13 */
14 class ErrorCodes
15 {
16 const MISSING_IDENTIFIER = 'missing_identifier';
17 const MISSING_PARAM = 'missing_param';
18 const INVALID_PARAM = 'invalid_param';
19 const FORBIDDEN = 'forbidden';
20 const NOT_FOUND = 'not_found';
21 const CREATE_FAILED = 'create_failed';
22 const TOOL_FAILED = 'tool_failed';
23 const CONFIRMATION_REQUIRED = 'confirmation_required';
24 const CONFIRMATION_EXPIRED = 'confirmation_expired';
25 const CONFIRMATION_INVALID = 'confirmation_invalid';
26 const STATE_CHANGED = 'state_changed';
27 const LIMIT_EXCEEDED = 'limit_exceeded';
28 const UNFILTERED_HTML_REQUIRED = 'unfiltered_html_required';
29 const FEATURE_DISABLED = 'feature_disabled';
30 const CONCURRENT_REQUEST = 'concurrent_request';
31 const EXECUTION_UNKNOWN = 'execution_unknown';
32
33 /** Every declared code — used by tests to guard against undeclared codes. */
34 public static function all()
35 {
36 return [
37 self::MISSING_IDENTIFIER,
38 self::MISSING_PARAM,
39 self::INVALID_PARAM,
40 self::FORBIDDEN,
41 self::NOT_FOUND,
42 self::CREATE_FAILED,
43 self::TOOL_FAILED,
44 self::CONFIRMATION_REQUIRED,
45 self::CONFIRMATION_EXPIRED,
46 self::CONFIRMATION_INVALID,
47 self::STATE_CHANGED,
48 self::LIMIT_EXCEEDED,
49 self::UNFILTERED_HTML_REQUIRED,
50 self::FEATURE_DISABLED,
51 self::CONCURRENT_REQUEST,
52 self::EXECUTION_UNKNOWN,
53 ];
54 }
55 }
56