@dreamforgestudiollc/emet 0.2.6 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +10 -0
- package/CHANGELOG.md +26 -1
- package/README.md +34 -8
- package/areas/emet.md +18 -0
- package/areas/garden.md +18 -0
- package/areas/health.md +18 -0
- package/areas/home.md +18 -0
- package/areas/learning.md +18 -0
- package/areas/state.md +18 -0
- package/docs/DEPLOY.md +32 -1
- package/docs/DEVELOPMENT-PRACTICES.md +26 -0
- package/docs/ERROR-CODES-SPEC.md +43 -0
- package/docs/ERROR-CODES.md +332 -0
- package/docs/GUIDED-SETUP.md +16 -0
- package/docs/PERMISSIONS.md +8 -5
- package/docs/ROADMAP.md +10 -10
- package/docs/SETUP.md +115 -12
- package/package.json +4 -2
- package/server.json +7 -3
- package/src/aleph.js +16 -10
- package/src/annotations.js +8 -3
- package/src/atlas-role.js +8 -3
- package/src/attribution.js +12 -12
- package/src/conformance.js +6 -4
- package/src/database.js +28 -12
- package/src/dispatch.js +33 -16
- package/src/error-codes.js +394 -0
- package/src/error-log.js +273 -0
- package/src/error-report.js +245 -0
- package/src/floor.js +6 -4
- package/src/gaps.js +2 -2
- package/src/gem-check.js +27 -26
- package/src/http-remote.js +2 -1
- package/src/index.js +1 -0
- package/src/invites.js +6 -5
- package/src/layers.js +8 -7
- package/src/mongo-connect.js +5 -0
- package/src/oauth-provider.js +28 -27
- package/src/pages.js +806 -0
- package/src/persons.js +2 -1
- package/src/provenance.js +10 -10
- package/src/rune-dispatch.js +10 -10
- package/src/session-graph.js +16 -15
- package/src/session.js +1 -1
- package/src/setup.js +21 -17
- package/src/startup-pages.js +3 -2
- package/src/startup-payload.js +3 -2
- package/src/subkey-store.js +3 -2
- package/src/tools.js +254 -177
- package/src/validation.js +61 -52
- package/src/version.js +1 -1
- package/templates/AREA.md +35 -0
- package/templates/INDEX.md +7 -6
- package/templates/PROCEDURE.md +1 -1
- package/templates/SEED.md +2 -2
- package/templates/STAGING.md +1 -1
- package/templates/THREAD.md +1 -1
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable EMET error codes. The code lives only on error.emet_code.
|
|
3
|
+
* Message text is not stored here. A code's meaning does not change.
|
|
4
|
+
* Removing a code from ERROR_CODES adds it to RETIRED_CODES. A retired
|
|
5
|
+
* number is not reused and is not listed in the registry or the lock.
|
|
6
|
+
*/
|
|
7
|
+
import crypto from 'node:crypto';
|
|
8
|
+
|
|
9
|
+
export const EMET_INT_001 = 'EMET-INT-001';
|
|
10
|
+
export const EMET_CODE_RE = /^EMET-[A-Z]{2,5}-\d{3}$/;
|
|
11
|
+
|
|
12
|
+
export function isEmetCodeOptions(v) {
|
|
13
|
+
return !!v && typeof v === 'object' && !Array.isArray(v)
|
|
14
|
+
&& typeof v.code === 'string' && EMET_CODE_RE.test(v.code)
|
|
15
|
+
&& Object.keys(v).length === 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function newCorrelationId() {
|
|
19
|
+
return crypto.randomBytes(8).toString('hex');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Plain Error with a stable code. name stays 'Error' so envelopes do not change class. */
|
|
23
|
+
export class CodedError extends Error {
|
|
24
|
+
constructor(message, options) {
|
|
25
|
+
super(message);
|
|
26
|
+
this.name = 'Error';
|
|
27
|
+
this.emetCode = options && options.code;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Attach a code to an error whose constructor this server does not own. */
|
|
32
|
+
export function assignCode(err, code) {
|
|
33
|
+
if (err && typeof err === 'object') err.emetCode = code;
|
|
34
|
+
return err;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const ERROR_CODES = Object.freeze({
|
|
38
|
+
'EMET-AUTH-001': Object.freeze({ area: 'AUTH', summary: "Could not allocate a person id", status: 'active', internal: false }),
|
|
39
|
+
'EMET-AUTH-002': Object.freeze({ area: 'AUTH', summary: "CIMD document is not a JSON object", status: 'active', internal: true }),
|
|
40
|
+
'EMET-AUTH-003': Object.freeze({ area: 'AUTH', summary: "CIMD client_id does not match its URL", status: 'active', internal: true }),
|
|
41
|
+
'EMET-AUTH-004': Object.freeze({ area: 'AUTH', summary: "CIMD redirect_uris are missing", status: 'active', internal: true }),
|
|
42
|
+
'EMET-AUTH-005': Object.freeze({ area: 'AUTH', summary: "CIMD client is not public", status: 'active', internal: true }),
|
|
43
|
+
'EMET-AUTH-006': Object.freeze({ area: 'AUTH', summary: "CIMD host is not a public address", status: 'active', internal: true }),
|
|
44
|
+
'EMET-AUTH-007': Object.freeze({ area: 'AUTH', summary: "CIMD host did not resolve", status: 'active', internal: true }),
|
|
45
|
+
'EMET-AUTH-008': Object.freeze({ area: 'AUTH', summary: "CIMD host resolves to a blocked address", status: 'active', internal: true }),
|
|
46
|
+
'EMET-AUTH-009': Object.freeze({ area: 'AUTH', summary: "CIMD fetch rate limit", status: 'active', internal: true }),
|
|
47
|
+
'EMET-AUTH-010': Object.freeze({ area: 'AUTH', summary: "CIMD fetch returned an HTTP error", status: 'active', internal: true }),
|
|
48
|
+
'EMET-AUTH-011': Object.freeze({ area: 'AUTH', summary: "CIMD document exceeds the size cap", status: 'active', internal: true }),
|
|
49
|
+
'EMET-AUTH-012': Object.freeze({ area: 'AUTH', summary: "CIMD document is not valid JSON", status: 'active', internal: true }),
|
|
50
|
+
'EMET-AUTH-013': Object.freeze({ area: 'AUTH', summary: "Authorization code is not recognised", status: 'active', internal: false }),
|
|
51
|
+
'EMET-AUTH-014': Object.freeze({ area: 'AUTH', summary: "Authorization code has expired", status: 'active', internal: false }),
|
|
52
|
+
'EMET-AUTH-015': Object.freeze({ area: 'AUTH', summary: "Redirect URI does not match the code", status: 'active', internal: false }),
|
|
53
|
+
'EMET-AUTH-016': Object.freeze({ area: 'AUTH', summary: "Authorization code has already been used", status: 'active', internal: false }),
|
|
54
|
+
'EMET-AUTH-017': Object.freeze({ area: 'AUTH', summary: "Refresh token is not recognised", status: 'active', internal: false }),
|
|
55
|
+
'EMET-AUTH-018': Object.freeze({ area: 'AUTH', summary: "Refresh token has expired", status: 'active', internal: false }),
|
|
56
|
+
'EMET-AUTH-019': Object.freeze({ area: 'AUTH', summary: "Login has no source tag bound", status: 'active', internal: false }),
|
|
57
|
+
'EMET-AUTH-020': Object.freeze({ area: 'AUTH', summary: "Refresh token has already been replaced", status: 'active', internal: false }),
|
|
58
|
+
'EMET-AUTH-021': Object.freeze({ area: 'AUTH', summary: "Member access login can no longer be refreshed", status: 'active', internal: false }),
|
|
59
|
+
'EMET-AUTH-022': Object.freeze({ area: 'AUTH', summary: "Invite login can no longer be refreshed", status: 'active', internal: false }),
|
|
60
|
+
'EMET-AUTH-023': Object.freeze({ area: 'AUTH', summary: "A refresh cannot widen scope", status: 'active', internal: false }),
|
|
61
|
+
'EMET-AUTH-024': Object.freeze({ area: 'AUTH', summary: "Access token is not recognised", status: 'active', internal: false }),
|
|
62
|
+
'EMET-AUTH-025': Object.freeze({ area: 'AUTH', summary: "Access token has expired", status: 'active', internal: false }),
|
|
63
|
+
'EMET-AUTH-026': Object.freeze({ area: 'AUTH', summary: "Sub-key open lost a race", status: 'active', internal: false }),
|
|
64
|
+
'EMET-AUTH-027': Object.freeze({ area: 'AUTH', summary: "Sub-key store conflict", status: 'active', internal: false }),
|
|
65
|
+
'EMET-AUTH-028': Object.freeze({ area: 'AUTH', summary: "Sub-key refusal", status: 'active', internal: false }),
|
|
66
|
+
'EMET-AUTH-029': Object.freeze({ area: 'AUTH', summary: "Guest display name is required", status: 'active', internal: false }),
|
|
67
|
+
'EMET-AUTH-030': Object.freeze({ area: 'AUTH', summary: "Guest access is off on this install", status: 'active', internal: false }),
|
|
68
|
+
'EMET-AUTH-031': Object.freeze({ area: 'AUTH', summary: "A guest invite accepts only read access", status: 'active', internal: false }),
|
|
69
|
+
'EMET-AUTH-032': Object.freeze({ area: 'AUTH', summary: "Guest invite source is not a registered tag", status: 'active', internal: false }),
|
|
70
|
+
'EMET-AUTH-033': Object.freeze({ area: 'AUTH', summary: "Member display name is required", status: 'active', internal: false }),
|
|
71
|
+
'EMET-AUTH-034': Object.freeze({ area: 'AUTH', summary: "Member access is off on this install", status: 'active', internal: false }),
|
|
72
|
+
'EMET-AUTH-035': Object.freeze({ area: 'AUTH', summary: "Member code source is not a registered tag", status: 'active', internal: false }),
|
|
73
|
+
'EMET-AUTH-036': Object.freeze({ area: 'AUTH', summary: "Only the owner can create invites", status: 'active', internal: false }),
|
|
74
|
+
'EMET-AUTH-037': Object.freeze({ area: 'AUTH', summary: "Only the owner can create member access", status: 'active', internal: false }),
|
|
75
|
+
'EMET-AUTH-038': Object.freeze({ area: 'AUTH', summary: "The error report is owner-only", status: 'active', internal: false }),
|
|
76
|
+
'EMET-AUTH-039': Object.freeze({ area: 'AUTH', summary: "HTTP attribution preflight was refused", status: 'active', internal: false }),
|
|
77
|
+
'EMET-CFG-001': Object.freeze({ area: 'CFG', summary: "Database name must be a plain name", status: 'active', internal: true }),
|
|
78
|
+
'EMET-CFG-002': Object.freeze({ area: 'CFG', summary: "Collection prefix must be a plain name", status: 'active', internal: true }),
|
|
79
|
+
'EMET-CFG-004': Object.freeze({ area: 'CFG', summary: "Hosted setup cannot turn sub-keys on from here", status: 'active', internal: false }),
|
|
80
|
+
'EMET-CFG-005': Object.freeze({ area: 'CFG', summary: "Could not read .env", status: 'active', internal: false }),
|
|
81
|
+
'EMET-CFG-006': Object.freeze({ area: 'CFG', summary: "Could not write .env", status: 'active', internal: false }),
|
|
82
|
+
'EMET-CFG-007': Object.freeze({ area: 'CFG', summary: "Startup page is not a whole number", status: 'active', internal: false }),
|
|
83
|
+
'EMET-CFG-008': Object.freeze({ area: 'CFG', summary: "Startup page does not exist", status: 'active', internal: false }),
|
|
84
|
+
'EMET-CFG-009': Object.freeze({ area: 'CFG', summary: "First-time setup was given a bot tag", status: 'active', internal: false }),
|
|
85
|
+
'EMET-CFG-010': Object.freeze({ area: 'CFG', summary: "Setup is missing required answers", status: 'active', internal: false }),
|
|
86
|
+
'EMET-CFG-011': Object.freeze({ area: 'CFG', summary: "Sub-key answer must be yes or no", status: 'active', internal: false }),
|
|
87
|
+
'EMET-CFG-012': Object.freeze({ area: 'CFG', summary: "Backup answer must be yes or no", status: 'active', internal: false }),
|
|
88
|
+
'EMET-CFG-013': Object.freeze({ area: 'CFG', summary: "Setup requires the owner", status: 'active', internal: false }),
|
|
89
|
+
'EMET-CFG-014': Object.freeze({ area: 'CFG', summary: "Store is already set up", status: 'active', internal: false }),
|
|
90
|
+
'EMET-DB-001': Object.freeze({ area: 'DB', summary: "MONGODB_URI is not set", status: 'active', internal: false }),
|
|
91
|
+
'EMET-DB-002': Object.freeze({ area: 'DB', summary: "Failed to connect to MongoDB", status: 'active', internal: false }),
|
|
92
|
+
'EMET-DB-003': Object.freeze({ area: 'DB', summary: "Query failed on a memory layer", status: 'active', internal: false }),
|
|
93
|
+
'EMET-DB-004': Object.freeze({ area: 'DB', summary: "Count failed on a memory layer", status: 'active', internal: false }),
|
|
94
|
+
'EMET-DB-005': Object.freeze({ area: 'DB', summary: "Unknown layer field", status: 'active', internal: false }),
|
|
95
|
+
'EMET-DB-006': Object.freeze({ area: 'DB', summary: "Failed to write to primary storage", status: 'active', internal: false }),
|
|
96
|
+
'EMET-DB-007': Object.freeze({ area: 'DB', summary: "Invalid memory layer", status: 'active', internal: false }),
|
|
97
|
+
'EMET-DB-008': Object.freeze({ area: 'DB', summary: "Failed to initialize a layer schema", status: 'active', internal: false }),
|
|
98
|
+
'EMET-DB-010': Object.freeze({ area: 'DB', summary: "Unknown layer in a gap query", status: 'active', internal: false }),
|
|
99
|
+
'EMET-DB-013': Object.freeze({ area: 'DB', summary: "Failed to save memory", status: 'active', internal: false }),
|
|
100
|
+
'EMET-DB-014': Object.freeze({ area: 'DB', summary: "Failed to revise memory", status: 'active', internal: false }),
|
|
101
|
+
'EMET-DB-015': Object.freeze({ area: 'DB', summary: "Failed to recall memories", status: 'active', internal: false }),
|
|
102
|
+
'EMET-DB-016': Object.freeze({ area: 'DB', summary: "Failed to query a layer", status: 'active', internal: false }),
|
|
103
|
+
'EMET-DB-017': Object.freeze({ area: 'DB', summary: "Failed to get system status", status: 'active', internal: false }),
|
|
104
|
+
'EMET-DB-018': Object.freeze({ area: 'DB', summary: "Failed to query transcripts", status: 'active', internal: false }),
|
|
105
|
+
'EMET-DB-019': Object.freeze({ area: 'DB', summary: "Failed to save a session transcript", status: 'active', internal: false }),
|
|
106
|
+
'EMET-DB-020': Object.freeze({ area: 'DB', summary: "Session open could not load unhandled drops", status: 'active', internal: false }),
|
|
107
|
+
'EMET-DB-021': Object.freeze({ area: 'DB', summary: "Session open could not check a closed session", status: 'active', internal: false }),
|
|
108
|
+
'EMET-DB-022': Object.freeze({ area: 'DB', summary: "Failed to revise a transcript", status: 'active', internal: false }),
|
|
109
|
+
'EMET-DB-023': Object.freeze({ area: 'DB', summary: "Failed to read a document", status: 'active', internal: false }),
|
|
110
|
+
'EMET-DB-024': Object.freeze({ area: 'DB', summary: "Failed to read document history", status: 'active', internal: false }),
|
|
111
|
+
'EMET-DB-025': Object.freeze({ area: 'DB', summary: "Failed to write a document", status: 'active', internal: false }),
|
|
112
|
+
'EMET-DB-026': Object.freeze({ area: 'DB', summary: "Failed to list documents", status: 'active', internal: false }),
|
|
113
|
+
'EMET-DB-027': Object.freeze({ area: 'DB', summary: "Retirement mark did not persist", status: 'active', internal: false }),
|
|
114
|
+
'EMET-DB-028': Object.freeze({ area: 'DB', summary: "Retiring altered the document", status: 'active', internal: false }),
|
|
115
|
+
'EMET-DB-029': Object.freeze({ area: 'DB', summary: "Failed to retire a document", status: 'active', internal: false }),
|
|
116
|
+
'EMET-DB-030': Object.freeze({ area: 'DB', summary: "Failed to rename a document", status: 'active', internal: false }),
|
|
117
|
+
'EMET-DB-031': Object.freeze({ area: 'DB', summary: "Failed to validate a document", status: 'active', internal: false }),
|
|
118
|
+
'EMET-DB-032': Object.freeze({ area: 'DB', summary: "Acceptance did not persist", status: 'active', internal: false }),
|
|
119
|
+
'EMET-DB-033': Object.freeze({ area: 'DB', summary: "Failed to accept a nonconformance", status: 'active', internal: false }),
|
|
120
|
+
'EMET-DB-034': Object.freeze({ area: 'DB', summary: "Failed to patch a document", status: 'active', internal: false }),
|
|
121
|
+
'EMET-DB-035': Object.freeze({ area: 'DB', summary: "Failed semantic recall", status: 'active', internal: false }),
|
|
122
|
+
'EMET-DB-036': Object.freeze({ area: 'DB', summary: "Failed corpus recall", status: 'active', internal: false }),
|
|
123
|
+
'EMET-DOC-001': Object.freeze({ area: 'DOC', summary: "doc_id must be a non-empty string", status: 'active', internal: false }),
|
|
124
|
+
'EMET-DOC-002': Object.freeze({ area: 'DOC', summary: "Document not found", status: 'active', internal: false }),
|
|
125
|
+
'EMET-DOC-003': Object.freeze({ area: 'DOC', summary: "No retained revision", status: 'active', internal: false }),
|
|
126
|
+
'EMET-DOC-004': Object.freeze({ area: 'DOC', summary: "expected_version is not a whole number", status: 'active', internal: false }),
|
|
127
|
+
'EMET-DOC-005': Object.freeze({ area: 'DOC', summary: "Document changed while paging", status: 'active', internal: false }),
|
|
128
|
+
'EMET-DOC-006': Object.freeze({ area: 'DOC', summary: "Version must be a positive integer", status: 'active', internal: false }),
|
|
129
|
+
'EMET-DOC-007': Object.freeze({ area: 'DOC', summary: "A record is superseded, not amended", status: 'active', internal: false }),
|
|
130
|
+
'EMET-DOC-008': Object.freeze({ area: 'DOC', summary: "Doc id is not stored as given", status: 'active', internal: false }),
|
|
131
|
+
'EMET-DOC-009': Object.freeze({ area: 'DOC', summary: "Client approvals are kept by the server", status: 'active', internal: false }),
|
|
132
|
+
'EMET-DOC-010': Object.freeze({ area: 'DOC', summary: "A declared tag wrote outside its own folder", status: 'active', internal: false }),
|
|
133
|
+
'EMET-DOC-011': Object.freeze({ area: 'DOC', summary: "A bot may write only its own records", status: 'active', internal: false }),
|
|
134
|
+
'EMET-DOC-012': Object.freeze({ area: 'DOC', summary: "Bot records require a registered tag", status: 'active', internal: false }),
|
|
135
|
+
'EMET-DOC-013': Object.freeze({ area: 'DOC', summary: "A bot tag cannot write a main record", status: 'active', internal: false }),
|
|
136
|
+
'EMET-DOC-014': Object.freeze({ area: 'DOC', summary: "Main records require a registered tag", status: 'active', internal: false }),
|
|
137
|
+
'EMET-DOC-015': Object.freeze({ area: 'DOC', summary: "Content must be a non-empty string", status: 'active', internal: false }),
|
|
138
|
+
'EMET-DOC-016': Object.freeze({ area: 'DOC', summary: "Content exceeds the 2MB limit", status: 'active', internal: false }),
|
|
139
|
+
'EMET-DOC-017': Object.freeze({ area: 'DOC', summary: "A record revision must name what it supersedes", status: 'active', internal: false }),
|
|
140
|
+
'EMET-DOC-018': Object.freeze({ area: 'DOC', summary: "supersedes does not name the revision in force", status: 'active', internal: false }),
|
|
141
|
+
'EMET-DOC-019': Object.freeze({ area: 'DOC', summary: "A record revision needs a reason", status: 'active', internal: false }),
|
|
142
|
+
'EMET-DOC-020': Object.freeze({ area: 'DOC', summary: "Unregistered source may write a new drop only", status: 'active', internal: false }),
|
|
143
|
+
'EMET-DOC-021': Object.freeze({ area: 'DOC', summary: "Drop cap for the day is reached", status: 'active', internal: false }),
|
|
144
|
+
'EMET-DOC-022': Object.freeze({ area: 'DOC', summary: "An existing working document is edited, not rewritten", status: 'active', internal: false }),
|
|
145
|
+
'EMET-DOC-023': Object.freeze({ area: 'DOC', summary: "A drop id already exists", status: 'active', internal: false }),
|
|
146
|
+
'EMET-DOC-024': Object.freeze({ area: 'DOC', summary: "A shipped copy is not replaced", status: 'active', internal: false }),
|
|
147
|
+
'EMET-DOC-025': Object.freeze({ area: 'DOC', summary: "A write would condense a document below half", status: 'active', internal: false }),
|
|
148
|
+
'EMET-DOC-026': Object.freeze({ area: 'DOC', summary: "A write would fall below half of the daily peak", status: 'active', internal: false }),
|
|
149
|
+
'EMET-DOC-027': Object.freeze({ area: 'DOC', summary: "The board is never retired", status: 'active', internal: false }),
|
|
150
|
+
'EMET-DOC-028': Object.freeze({ area: 'DOC', summary: "Working documents are edited, not retired", status: 'active', internal: false }),
|
|
151
|
+
'EMET-DOC-029': Object.freeze({ area: 'DOC', summary: "retire_doc needs a reason", status: 'active', internal: false }),
|
|
152
|
+
'EMET-DOC-030': Object.freeze({ area: 'DOC', summary: "old_id must be a non-empty string", status: 'active', internal: false }),
|
|
153
|
+
'EMET-DOC-031': Object.freeze({ area: 'DOC', summary: "new_id must be a non-empty string", status: 'active', internal: false }),
|
|
154
|
+
'EMET-DOC-032': Object.freeze({ area: 'DOC', summary: "old_id and new_id name the same document", status: 'active', internal: false }),
|
|
155
|
+
'EMET-DOC-033': Object.freeze({ area: 'DOC', summary: "rename_doc needs a reason", status: 'active', internal: false }),
|
|
156
|
+
'EMET-DOC-034': Object.freeze({ area: 'DOC', summary: "The board is never renamed", status: 'active', internal: false }),
|
|
157
|
+
'EMET-DOC-035': Object.freeze({ area: 'DOC', summary: "A drop is write-once", status: 'active', internal: false }),
|
|
158
|
+
'EMET-DOC-036': Object.freeze({ area: 'DOC', summary: "Rename destination already exists", status: 'active', internal: false }),
|
|
159
|
+
'EMET-DOC-037': Object.freeze({ area: 'DOC', summary: "restore_doc needs a reason", status: 'active', internal: false }),
|
|
160
|
+
'EMET-DOC-038': Object.freeze({ area: 'DOC', summary: "restore_doc needs a source", status: 'active', internal: false }),
|
|
161
|
+
'EMET-DOC-039': Object.freeze({ area: 'DOC', summary: "A drop is never restored", status: 'active', internal: false }),
|
|
162
|
+
'EMET-DOC-040': Object.freeze({ area: 'DOC', summary: "A record is not restored", status: 'active', internal: false }),
|
|
163
|
+
'EMET-DOC-041': Object.freeze({ area: 'DOC', summary: "A shipped copy is not restored", status: 'active', internal: false }),
|
|
164
|
+
'EMET-DOC-042': Object.freeze({ area: 'DOC', summary: "Restore source is not in EMET_RESTORE_TAGS", status: 'active', internal: false }),
|
|
165
|
+
'EMET-DOC-043': Object.freeze({ area: 'DOC', summary: "Retained revision does not match its digest", status: 'active', internal: false }),
|
|
166
|
+
'EMET-DOC-044': Object.freeze({ area: 'DOC', summary: "Templated revision has no conformance verdict", status: 'active', internal: false }),
|
|
167
|
+
'EMET-DOC-045': Object.freeze({ area: 'DOC', summary: "Retained revision was not conforming", status: 'active', internal: false }),
|
|
168
|
+
'EMET-DOC-046': Object.freeze({ area: 'DOC', summary: "validate_doc needs a document or content", status: 'active', internal: false }),
|
|
169
|
+
'EMET-DOC-047': Object.freeze({ area: 'DOC', summary: "Template does not ship with this release", status: 'active', internal: false }),
|
|
170
|
+
'EMET-DOC-048': Object.freeze({ area: 'DOC', summary: "An acceptance needs a written reason", status: 'active', internal: false }),
|
|
171
|
+
'EMET-DOC-049': Object.freeze({ area: 'DOC', summary: "An acceptance reason is too short", status: 'active', internal: false }),
|
|
172
|
+
'EMET-DOC-050': Object.freeze({ area: 'DOC', summary: "Document has no nonconformance to accept", status: 'active', internal: false }),
|
|
173
|
+
'EMET-DOC-051': Object.freeze({ area: 'DOC', summary: "A required name is empty", status: 'active', internal: false }),
|
|
174
|
+
'EMET-DOC-052': Object.freeze({ area: 'DOC', summary: "Document version conflict", status: 'active', internal: false }),
|
|
175
|
+
'EMET-DOC-053': Object.freeze({ area: 'DOC', summary: "Patch target text was not found", status: 'active', internal: false }),
|
|
176
|
+
'EMET-DOC-054': Object.freeze({ area: 'DOC', summary: "Patch target text matched more than once", status: 'active', internal: false }),
|
|
177
|
+
'EMET-DOC-055': Object.freeze({ area: 'DOC', summary: "patch_doc needs a reason", status: 'active', internal: false }),
|
|
178
|
+
'EMET-DOC-056': Object.freeze({ area: 'DOC', summary: "patch_doc cannot edit a drop", status: 'active', internal: false }),
|
|
179
|
+
'EMET-DOC-057': Object.freeze({ area: 'DOC', summary: "old_str must be a non-empty string", status: 'active', internal: false }),
|
|
180
|
+
'EMET-DOC-058': Object.freeze({ area: 'DOC', summary: "new_str must be a string", status: 'active', internal: false }),
|
|
181
|
+
'EMET-DOC-059': Object.freeze({ area: 'DOC', summary: "Patch edits overlap", status: 'active', internal: false }),
|
|
182
|
+
'EMET-GEM-001': Object.freeze({ area: 'GEM', summary: "Read-back found no document", status: 'active', internal: false }),
|
|
183
|
+
'EMET-GEM-002': Object.freeze({ area: 'GEM', summary: "Read-back content digest differs", status: 'active', internal: false }),
|
|
184
|
+
'EMET-GEM-003': Object.freeze({ area: 'GEM', summary: "Read-back version differs", status: 'active', internal: false }),
|
|
185
|
+
'EMET-GEM-004': Object.freeze({ area: 'GEM', summary: "Read-back found no layer entry", status: 'active', internal: false }),
|
|
186
|
+
'EMET-GEM-005': Object.freeze({ area: 'GEM', summary: "Layer sha256 column does not match content", status: 'active', internal: false }),
|
|
187
|
+
'EMET-GEM-006': Object.freeze({ area: 'GEM', summary: "Read-back content differs", status: 'active', internal: false }),
|
|
188
|
+
'EMET-GEM-007': Object.freeze({ area: 'GEM', summary: "Metadata digest column does not match", status: 'active', internal: false }),
|
|
189
|
+
'EMET-GEM-008': Object.freeze({ area: 'GEM', summary: "Read-back metadata differs", status: 'active', internal: false }),
|
|
190
|
+
'EMET-GEM-009': Object.freeze({ area: 'GEM', summary: "Unknown floor section", status: 'active', internal: false }),
|
|
191
|
+
'EMET-GEM-010': Object.freeze({ area: 'GEM', summary: "Unknown GEM", status: 'active', internal: false }),
|
|
192
|
+
'EMET-GEM-011': Object.freeze({ area: 'GEM', summary: "GEM is not loadable", status: 'active', internal: false }),
|
|
193
|
+
'EMET-GEM-012': Object.freeze({ area: 'GEM', summary: "GEM has no floor", status: 'active', internal: false }),
|
|
194
|
+
'EMET-GEM-013': Object.freeze({ area: 'GEM', summary: "GEM manifest schema id", status: 'active', internal: true }),
|
|
195
|
+
'EMET-GEM-014': Object.freeze({ area: 'GEM', summary: "Unexpected end of JSON", status: 'active', internal: true }),
|
|
196
|
+
'EMET-GEM-015': Object.freeze({ area: 'GEM', summary: "Unexpected character in JSON", status: 'active', internal: true }),
|
|
197
|
+
'EMET-GEM-016': Object.freeze({ area: 'GEM', summary: "Unexpected token in JSON", status: 'active', internal: true }),
|
|
198
|
+
'EMET-GEM-017': Object.freeze({ area: 'GEM', summary: "Bad number in JSON", status: 'active', internal: true }),
|
|
199
|
+
'EMET-GEM-018': Object.freeze({ area: 'GEM', summary: "Bad escape in JSON", status: 'active', internal: true }),
|
|
200
|
+
'EMET-GEM-019': Object.freeze({ area: 'GEM', summary: "Raw control character in a JSON string", status: 'active', internal: true }),
|
|
201
|
+
'EMET-GEM-020': Object.freeze({ area: 'GEM', summary: "Unterminated JSON string", status: 'active', internal: true }),
|
|
202
|
+
'EMET-GEM-021': Object.freeze({ area: 'GEM', summary: "Trailing comma in JSON", status: 'active', internal: true }),
|
|
203
|
+
'EMET-GEM-022': Object.freeze({ area: 'GEM', summary: "Expected a comma in JSON", status: 'active', internal: true }),
|
|
204
|
+
'EMET-GEM-023': Object.freeze({ area: 'GEM', summary: "Unterminated JSON array", status: 'active', internal: true }),
|
|
205
|
+
'EMET-GEM-024': Object.freeze({ area: 'GEM', summary: "Expected a JSON key", status: 'active', internal: true }),
|
|
206
|
+
'EMET-GEM-025': Object.freeze({ area: 'GEM', summary: "Duplicate JSON key", status: 'active', internal: true }),
|
|
207
|
+
'EMET-GEM-026': Object.freeze({ area: 'GEM', summary: "Forbidden JSON key", status: 'active', internal: true }),
|
|
208
|
+
'EMET-GEM-027': Object.freeze({ area: 'GEM', summary: "Expected a colon in JSON", status: 'active', internal: true }),
|
|
209
|
+
'EMET-GEM-028': Object.freeze({ area: 'GEM', summary: "Unterminated JSON object", status: 'active', internal: true }),
|
|
210
|
+
'EMET-GEM-029': Object.freeze({ area: 'GEM', summary: "JSON starts with a BOM", status: 'active', internal: true }),
|
|
211
|
+
'EMET-GEM-030': Object.freeze({ area: 'GEM', summary: "Trailing data after JSON", status: 'active', internal: true }),
|
|
212
|
+
'EMET-GEM-031': Object.freeze({ area: 'GEM', summary: "JSON number is not a safe integer", status: 'active', internal: true }),
|
|
213
|
+
'EMET-GEM-032': Object.freeze({ area: 'GEM', summary: "Unsupported JSON value", status: 'active', internal: true }),
|
|
214
|
+
'EMET-GEM-033': Object.freeze({ area: 'GEM', summary: "Attestation is immutable", status: 'active', internal: false }),
|
|
215
|
+
'EMET-GEM-034': Object.freeze({ area: 'GEM', summary: "metadata.gem must name the active directive", status: 'active', internal: false }),
|
|
216
|
+
'EMET-GEM-035': Object.freeze({ area: 'GEM', summary: "Served artifact has no hash pin", status: 'active', internal: false }),
|
|
217
|
+
'EMET-GEM-036': Object.freeze({ area: 'GEM', summary: "No authenticated principal", status: 'active', internal: false }),
|
|
218
|
+
'EMET-GEM-037': Object.freeze({ area: 'GEM', summary: "Serve log could not be written", status: 'active', internal: false }),
|
|
219
|
+
'EMET-GEM-038': Object.freeze({ area: 'GEM', summary: "No serve event", status: 'active', internal: false }),
|
|
220
|
+
'EMET-GEM-039': Object.freeze({ area: 'GEM', summary: "Client-reported sha256 is not accepted here", status: 'active', internal: false }),
|
|
221
|
+
'EMET-GEM-040': Object.freeze({ area: 'GEM', summary: "Input hash or reference is required", status: 'active', internal: false }),
|
|
222
|
+
'EMET-GEM-041': Object.freeze({ area: 'GEM', summary: "Served rune has no hash pin", status: 'active', internal: false }),
|
|
223
|
+
'EMET-GEM-042': Object.freeze({ area: 'GEM', summary: "GEM socket failed closed", status: 'active', internal: false }),
|
|
224
|
+
'EMET-INT-001': Object.freeze({ area: 'INT', summary: "Unclassified internal error", status: 'active', internal: false }),
|
|
225
|
+
'EMET-MEM-001': Object.freeze({ area: 'MEM', summary: "Unknown memory layer", status: 'active', internal: false }),
|
|
226
|
+
'EMET-MEM-002': Object.freeze({ area: 'MEM', summary: "Unknown importance bucket", status: 'active', internal: false }),
|
|
227
|
+
'EMET-MEM-003': Object.freeze({ area: 'MEM', summary: "Unknown importance bucket name", status: 'active', internal: false }),
|
|
228
|
+
'EMET-MEM-004': Object.freeze({ area: 'MEM', summary: "Unknown importance degree", status: 'active', internal: false }),
|
|
229
|
+
'EMET-MEM-005': Object.freeze({ area: 'MEM', summary: "Lesson metadata was refused", status: 'active', internal: false }),
|
|
230
|
+
'EMET-MEM-006': Object.freeze({ area: 'MEM', summary: "session_id must come from emet_session_open", status: 'active', internal: false }),
|
|
231
|
+
'EMET-MEM-007': Object.freeze({ area: 'MEM', summary: "Transcript positions cannot be read", status: 'active', internal: false }),
|
|
232
|
+
'EMET-MEM-008': Object.freeze({ area: 'MEM', summary: "An entry must carry its source", status: 'active', internal: false }),
|
|
233
|
+
'EMET-MEM-009': Object.freeze({ area: 'MEM', summary: "A correction names a missing entry", status: 'active', internal: false }),
|
|
234
|
+
'EMET-MEM-010': Object.freeze({ area: 'MEM', summary: "Episodic revision is prohibited", status: 'active', internal: false }),
|
|
235
|
+
'EMET-MEM-011': Object.freeze({ area: 'MEM', summary: "target_id must be a positive integer", status: 'active', internal: false }),
|
|
236
|
+
'EMET-MEM-012': Object.freeze({ area: 'MEM', summary: "No entry with that id in the layer", status: 'active', internal: false }),
|
|
237
|
+
'EMET-MEM-013': Object.freeze({ area: 'MEM', summary: "Entry is already superseded", status: 'active', internal: false }),
|
|
238
|
+
'EMET-MEM-014': Object.freeze({ area: 'MEM', summary: "order must be latest", status: 'active', internal: false }),
|
|
239
|
+
'EMET-MEM-015': Object.freeze({ area: 'MEM', summary: "Search term exceeds the maximum length", status: 'active', internal: false }),
|
|
240
|
+
'EMET-MEM-016': Object.freeze({ area: 'MEM', summary: "Session slug was refused", status: 'active', internal: false }),
|
|
241
|
+
'EMET-MEM-017': Object.freeze({ area: 'MEM', summary: "session_id is required", status: 'active', internal: false }),
|
|
242
|
+
'EMET-MEM-018': Object.freeze({ area: 'MEM', summary: "Machine check refused the append", status: 'active', internal: false }),
|
|
243
|
+
'EMET-MEM-019': Object.freeze({ area: 'MEM', summary: "A bot tag cannot retire documents", status: 'active', internal: false }),
|
|
244
|
+
'EMET-MEM-020': Object.freeze({ area: 'MEM', summary: "A bot tag cannot rename documents", status: 'active', internal: false }),
|
|
245
|
+
'EMET-MEM-021': Object.freeze({ area: 'MEM', summary: "The board already exists", status: 'active', internal: false }),
|
|
246
|
+
'EMET-MEM-022': Object.freeze({ area: 'MEM', summary: "The board is never written with write_doc", status: 'active', internal: false }),
|
|
247
|
+
'EMET-MEM-023': Object.freeze({ area: 'MEM', summary: "The board is provisioned by setup", status: 'active', internal: false }),
|
|
248
|
+
'EMET-MEM-024': Object.freeze({ area: 'MEM', summary: "A board edit needs a session id", status: 'active', internal: false }),
|
|
249
|
+
'EMET-MEM-025': Object.freeze({ area: 'MEM', summary: "Board edit blocked: drop list unknown", status: 'active', internal: false }),
|
|
250
|
+
'EMET-MEM-026': Object.freeze({ area: 'MEM', summary: "Unhandled drops block a board restore", status: 'active', internal: false }),
|
|
251
|
+
'EMET-MEM-027': Object.freeze({ area: 'MEM', summary: "Unhandled drops block a board edit", status: 'active', internal: false }),
|
|
252
|
+
'EMET-MEM-028': Object.freeze({ area: 'MEM', summary: "An added board row needs origin", status: 'active', internal: false }),
|
|
253
|
+
'EMET-MEM-029': Object.freeze({ area: 'MEM', summary: "The board edit is nonconforming", status: 'active', internal: false }),
|
|
254
|
+
'EMET-MEM-030': Object.freeze({ area: 'MEM', summary: "Query must be a non-empty string", status: 'active', internal: false }),
|
|
255
|
+
'EMET-MEM-032': Object.freeze({ area: 'MEM', summary: "Corpus name is not recognised", status: 'active', internal: false }),
|
|
256
|
+
'EMET-MEM-034': Object.freeze({ area: 'MEM', summary: "Only a ready payload can be abridged", status: 'active', internal: false }),
|
|
257
|
+
'EMET-PAGE-001': Object.freeze({ area: 'PAGE', summary: "as_of must be an ISO date or unix seconds", status: 'active', internal: false }),
|
|
258
|
+
'EMET-PAGE-002': Object.freeze({ area: 'PAGE', summary: "Only the owner can create or edit an area document", status: 'active', internal: false }),
|
|
259
|
+
'EMET-PAGE-003': Object.freeze({ area: 'PAGE', summary: "Only the owner can read topic pages", status: 'active', internal: false }),
|
|
260
|
+
'EMET-PAGE-004': Object.freeze({ area: 'PAGE', summary: "Area must be a slug", status: 'active', internal: false }),
|
|
261
|
+
'EMET-PAGE-005': Object.freeze({ area: 'PAGE', summary: "No current area document", status: 'active', internal: false }),
|
|
262
|
+
'EMET-PAGE-006': Object.freeze({ area: 'PAGE', summary: "Lint found no current area document", status: 'active', internal: false }),
|
|
263
|
+
'EMET-PAGE-007': Object.freeze({ area: 'PAGE', summary: "Startup pages could not fit the budget", status: 'active', internal: false }),
|
|
264
|
+
'EMET-PROV-001': Object.freeze({ area: 'PROV', summary: "derived_from must be an object", status: 'active', internal: false }),
|
|
265
|
+
'EMET-PROV-002': Object.freeze({ area: 'PROV', summary: "derived_from has two origins", status: 'active', internal: false }),
|
|
266
|
+
'EMET-PROV-003': Object.freeze({ area: 'PROV', summary: "derived_from needs a span or entries", status: 'active', internal: false }),
|
|
267
|
+
'EMET-PROV-004': Object.freeze({ area: 'PROV', summary: "derived_from.entries must be a non-empty array", status: 'active', internal: false }),
|
|
268
|
+
'EMET-PROV-005': Object.freeze({ area: 'PROV', summary: "Entry ids must be positive integers", status: 'active', internal: false }),
|
|
269
|
+
'EMET-PROV-006': Object.freeze({ area: 'PROV', summary: "derived_from.session_id must be a non-empty string", status: 'active', internal: false }),
|
|
270
|
+
'EMET-PROV-007': Object.freeze({ area: 'PROV', summary: "exchange_start must be a positive integer", status: 'active', internal: false }),
|
|
271
|
+
'EMET-PROV-008': Object.freeze({ area: 'PROV', summary: "exchange_end is before exchange_start", status: 'active', internal: false }),
|
|
272
|
+
'EMET-PROV-009': Object.freeze({ area: 'PROV', summary: "exchange_end must be a positive integer", status: 'active', internal: false }),
|
|
273
|
+
'EMET-PROV-010': Object.freeze({ area: 'PROV', summary: "Provenance entry is required", status: 'active', internal: false }),
|
|
274
|
+
'EMET-RATE-001': Object.freeze({ area: 'RATE', summary: "Rate limit exceeded", status: 'active', internal: false }),
|
|
275
|
+
'EMET-SESS-001': Object.freeze({ area: 'SESS', summary: "The transcript position is not available", status: 'active', internal: false }),
|
|
276
|
+
'EMET-SESS-002': Object.freeze({ area: 'SESS', summary: "Transcript timestamps must be numbers", status: 'active', internal: false }),
|
|
277
|
+
'EMET-SESS-003': Object.freeze({ area: 'SESS', summary: "timestamp_start must be before timestamp_end", status: 'active', internal: false }),
|
|
278
|
+
'EMET-SESS-004': Object.freeze({ area: 'SESS', summary: "session_id must be a string", status: 'active', internal: false }),
|
|
279
|
+
'EMET-SESS-005': Object.freeze({ area: 'SESS', summary: "Session graph is unavailable", status: 'active', internal: false }),
|
|
280
|
+
'EMET-TOOL-001': Object.freeze({ area: 'TOOL', summary: "A tool has no annotation entry", status: 'active', internal: true }),
|
|
281
|
+
'EMET-TOOL-002': Object.freeze({ area: 'TOOL', summary: "A source tag is required", status: 'active', internal: false }),
|
|
282
|
+
'EMET-TOOL-003': Object.freeze({ area: 'TOOL', summary: "A source tag is required and none are registered", status: 'active', internal: false }),
|
|
283
|
+
'EMET-TOOL-004': Object.freeze({ area: 'TOOL', summary: "Source tag is not registered", status: 'active', internal: false }),
|
|
284
|
+
'EMET-TOOL-005': Object.freeze({ area: 'TOOL', summary: "The call is outside the token scope", status: 'active', internal: false }),
|
|
285
|
+
'EMET-TOOL-006': Object.freeze({ area: 'TOOL', summary: "Exchange index was refused", status: 'active', internal: false }),
|
|
286
|
+
'EMET-TOOL-007': Object.freeze({ area: 'TOOL', summary: "Client approval was refused", status: 'active', internal: false }),
|
|
287
|
+
'EMET-TOOL-008': Object.freeze({ area: 'TOOL', summary: "Unknown tool", status: 'active', internal: false }),
|
|
288
|
+
'EMET-TOOL-009': Object.freeze({ area: 'TOOL', summary: "since must be an ISO date", status: 'active', internal: false }),
|
|
289
|
+
'EMET-TOOL-010': Object.freeze({ area: 'TOOL', summary: "since is older than 90 days", status: 'active', internal: false }),
|
|
290
|
+
'EMET-TOOL-011': Object.freeze({ area: 'TOOL', summary: "codes must be a list of EMET codes", status: 'active', internal: false }),
|
|
291
|
+
'EMET-TOOL-012': Object.freeze({ area: 'TOOL', summary: "limit must be a whole number from 1 to 200", status: 'active', internal: false }),
|
|
292
|
+
'EMET-TOOL-013': Object.freeze({ area: 'TOOL', summary: "correlation_id must be 16 hex characters", status: 'active', internal: false }),
|
|
293
|
+
'EMET-TRN-001': Object.freeze({ area: 'TRN', summary: "An exchange field exceeds the length cap", status: 'active', internal: false }),
|
|
294
|
+
'EMET-TRN-002': Object.freeze({ area: 'TRN', summary: "Transcript request exceeds the length cap", status: 'active', internal: false }),
|
|
295
|
+
'EMET-TRN-003': Object.freeze({ area: 'TRN', summary: "session_id must be a non-empty string", status: 'active', internal: false }),
|
|
296
|
+
'EMET-TRN-004': Object.freeze({ area: 'TRN', summary: "session_start must be a Unix timestamp", status: 'active', internal: false }),
|
|
297
|
+
'EMET-TRN-005': Object.freeze({ area: 'TRN', summary: "exchanges must be a non-empty array", status: 'active', internal: false }),
|
|
298
|
+
'EMET-TRN-006': Object.freeze({ area: 'TRN', summary: "Exchange messages must be strings", status: 'active', internal: false }),
|
|
299
|
+
'EMET-TRN-007': Object.freeze({ area: 'TRN', summary: "A transcript revision replaces the whole part", status: 'active', internal: false }),
|
|
300
|
+
'EMET-TRN-008': Object.freeze({ area: 'TRN', summary: "A transcript correction needs a reason", status: 'active', internal: false }),
|
|
301
|
+
'EMET-TRN-009': Object.freeze({ area: 'TRN', summary: "No transcript found under that session id", status: 'active', internal: false }),
|
|
302
|
+
'EMET-TRN-010': Object.freeze({ area: 'TRN', summary: "exchange_index must be a whole number", status: 'active', internal: false }),
|
|
303
|
+
'EMET-VAL-001': Object.freeze({ area: 'VAL', summary: "Content is required", status: 'active', internal: false }),
|
|
304
|
+
'EMET-VAL-002': Object.freeze({ area: 'VAL', summary: "Content must be a string", status: 'active', internal: false }),
|
|
305
|
+
'EMET-VAL-003': Object.freeze({ area: 'VAL', summary: "Content is shorter than the minimum", status: 'active', internal: false }),
|
|
306
|
+
'EMET-VAL-004': Object.freeze({ area: 'VAL', summary: "Content exceeds the maximum length", status: 'active', internal: false }),
|
|
307
|
+
'EMET-VAL-005': Object.freeze({ area: 'VAL', summary: "Query is required", status: 'active', internal: false }),
|
|
308
|
+
'EMET-VAL-006': Object.freeze({ area: 'VAL', summary: "Query must be a string", status: 'active', internal: false }),
|
|
309
|
+
'EMET-VAL-007': Object.freeze({ area: 'VAL', summary: "Query cannot be empty", status: 'active', internal: false }),
|
|
310
|
+
'EMET-VAL-008': Object.freeze({ area: 'VAL', summary: "Query exceeds the maximum length", status: 'active', internal: false }),
|
|
311
|
+
'EMET-VAL-010': Object.freeze({ area: 'VAL', summary: "Context must be a string", status: 'active', internal: false }),
|
|
312
|
+
'EMET-VAL-011': Object.freeze({ area: 'VAL', summary: "Context exceeds the maximum length", status: 'active', internal: false }),
|
|
313
|
+
'EMET-VAL-012': Object.freeze({ area: 'VAL', summary: "Layer is required", status: 'active', internal: false }),
|
|
314
|
+
'EMET-VAL-013': Object.freeze({ area: 'VAL', summary: "Layer must be a string", status: 'active', internal: false }),
|
|
315
|
+
'EMET-VAL-014': Object.freeze({ area: 'VAL', summary: "Invalid layer", status: 'active', internal: false }),
|
|
316
|
+
'EMET-VAL-015': Object.freeze({ area: 'VAL', summary: "Value is required", status: 'active', internal: false }),
|
|
317
|
+
'EMET-VAL-016': Object.freeze({ area: 'VAL', summary: "Value must be a number", status: 'active', internal: false }),
|
|
318
|
+
'EMET-VAL-017': Object.freeze({ area: 'VAL', summary: "Value is outside the allowed range", status: 'active', internal: false }),
|
|
319
|
+
'EMET-VAL-018': Object.freeze({ area: 'VAL', summary: "Metadata must be an object", status: 'active', internal: false }),
|
|
320
|
+
'EMET-VAL-019': Object.freeze({ area: 'VAL', summary: "Metadata exceeds the maximum size", status: 'active', internal: false }),
|
|
321
|
+
'EMET-VAL-020': Object.freeze({ area: 'VAL', summary: "metadata.session_id is not accepted", status: 'active', internal: false }),
|
|
322
|
+
'EMET-VAL-021': Object.freeze({ area: 'VAL', summary: "expires_at disagrees with valid_until", status: 'active', internal: false }),
|
|
323
|
+
'EMET-VAL-022': Object.freeze({ area: 'VAL', summary: "valid_until disagrees with expires_at", status: 'active', internal: false }),
|
|
324
|
+
'EMET-VAL-023': Object.freeze({ area: 'VAL', summary: "Routing must be a plain object", status: 'active', internal: false }),
|
|
325
|
+
'EMET-VAL-024': Object.freeze({ area: 'VAL', summary: "Value must be a boolean", status: 'active', internal: false }),
|
|
326
|
+
'EMET-VAL-025': Object.freeze({ area: 'VAL', summary: "Invalid assertion_origin", status: 'active', internal: false }),
|
|
327
|
+
'EMET-VAL-026': Object.freeze({ area: 'VAL', summary: "Value must be a string", status: 'active', internal: false }),
|
|
328
|
+
'EMET-VAL-027': Object.freeze({ area: 'VAL', summary: "Custom metadata object is too large", status: 'active', internal: false }),
|
|
329
|
+
'EMET-VAL-028': Object.freeze({ area: 'VAL', summary: "valid_from is after valid_until", status: 'active', internal: false }),
|
|
330
|
+
'EMET-VAL-029': Object.freeze({ area: 'VAL', summary: "Value must be a positive integer", status: 'active', internal: false }),
|
|
331
|
+
'EMET-VAL-030': Object.freeze({ area: 'VAL', summary: "Tags must be an array", status: 'active', internal: false }),
|
|
332
|
+
'EMET-VAL-031': Object.freeze({ area: 'VAL', summary: "Too many tags", status: 'active', internal: false }),
|
|
333
|
+
'EMET-VAL-032': Object.freeze({ area: 'VAL', summary: "Each tag must be a string", status: 'active', internal: false }),
|
|
334
|
+
'EMET-VAL-033': Object.freeze({ area: 'VAL', summary: "Tag exceeds the maximum length", status: 'active', internal: false }),
|
|
335
|
+
'EMET-VAL-034': Object.freeze({ area: 'VAL', summary: "Related ids must be an array", status: 'active', internal: false }),
|
|
336
|
+
'EMET-VAL-035': Object.freeze({ area: 'VAL', summary: "Too many related ids", status: 'active', internal: false }),
|
|
337
|
+
'EMET-VAL-036': Object.freeze({ area: 'VAL', summary: "Value exceeds the maximum length", status: 'active', internal: false }),
|
|
338
|
+
'EMET-VAL-037': Object.freeze({ area: 'VAL', summary: "Filters must be an object", status: 'active', internal: false }),
|
|
339
|
+
'EMET-VAL-038': Object.freeze({ area: 'VAL', summary: "Unknown importance bucket filter", status: 'active', internal: false }),
|
|
340
|
+
'EMET-VAL-039': Object.freeze({ area: 'VAL', summary: "Content search term exceeds the maximum length", status: 'active', internal: false }),
|
|
341
|
+
'EMET-VAL-040': Object.freeze({ area: 'VAL', summary: "Context search term exceeds the maximum length", status: 'active', internal: false }),
|
|
342
|
+
'EMET-VAL-041': Object.freeze({ area: 'VAL', summary: "importance_min is greater than importance_max", status: 'active', internal: false }),
|
|
343
|
+
'EMET-VAL-042': Object.freeze({ area: 'VAL', summary: "emotional_intensity_min is greater than the max", status: 'active', internal: false }),
|
|
344
|
+
'EMET-VAL-043': Object.freeze({ area: 'VAL', summary: "timestamp_after is after timestamp_before", status: 'active', internal: false }),
|
|
345
|
+
'EMET-VAL-044': Object.freeze({ area: 'VAL', summary: "Options must be an object", status: 'active', internal: false }),
|
|
346
|
+
'EMET-VAL-045': Object.freeze({ area: 'VAL', summary: "order_by must be a string", status: 'active', internal: false }),
|
|
347
|
+
'EMET-VAL-046': Object.freeze({ area: 'VAL', summary: "Arguments must be an object", status: 'active', internal: false }),
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
/** Numbers removed from the registry. Add a code here when it leaves ERROR_CODES. */
|
|
351
|
+
export const RETIRED_CODES = Object.freeze({
|
|
352
|
+
'EMET-CFG-003': Object.freeze({ area: 'CFG', summary: "MONGODB_URI is not set for setup", status: 'retired', internal: false, retired_in: '0.3.0' }),
|
|
353
|
+
'EMET-DB-009': Object.freeze({ area: 'DB', summary: "MONGODB_URI is not set; cannot assess gaps", status: 'retired', internal: false, retired_in: '0.3.0' }),
|
|
354
|
+
'EMET-DB-011': Object.freeze({ area: 'DB', summary: "MONGODB_URI is not set; cannot read topic pages", status: 'retired', internal: false, retired_in: '0.3.0' }),
|
|
355
|
+
'EMET-DB-012': Object.freeze({ area: 'DB', summary: "MONGODB_URI is not set; cannot verify session artifacts", status: 'retired', internal: false, retired_in: '0.3.0' }),
|
|
356
|
+
'EMET-MEM-031': Object.freeze({ area: 'MEM', summary: "Query exceeds the maximum length", status: 'retired', internal: false, retired_in: '0.3.0' }),
|
|
357
|
+
'EMET-MEM-033': Object.freeze({ area: 'MEM', summary: "Startup pages could not fit the budget", status: 'retired', internal: false, retired_in: '0.3.0' }),
|
|
358
|
+
'EMET-VAL-009': Object.freeze({ area: 'VAL', summary: "Query exceeds the maximum length", status: 'retired', internal: false, retired_in: '0.3.0' }),
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
export function lookupEmetCode(code) {
|
|
362
|
+
return ERROR_CODES[code] || null;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export function renderErrorCodesDoc() {
|
|
366
|
+
const codes = Object.keys(ERROR_CODES).sort();
|
|
367
|
+
const retired = Object.keys(RETIRED_CODES).sort();
|
|
368
|
+
const lines = [];
|
|
369
|
+
lines.push('# EMET error codes');
|
|
370
|
+
lines.push('');
|
|
371
|
+
lines.push('Every error EMET returns carries a stable code in `error.emet_code`. The existing `error.code` field is unchanged. The same meaning keeps the same code. A code is not reused and its meaning is not changed. A retired number stays reserved in the list below and is not issued again.');
|
|
372
|
+
lines.push('');
|
|
373
|
+
lines.push('Internal codes are raised inside a check that catches them before a caller sees them. If one ever reaches a caller it is still that code, not a new one.');
|
|
374
|
+
lines.push('');
|
|
375
|
+
lines.push('| Code | Summary | Status |');
|
|
376
|
+
lines.push('|---|---|---|');
|
|
377
|
+
for (const code of codes) {
|
|
378
|
+
const row = ERROR_CODES[code];
|
|
379
|
+
const status = row.internal && row.status === 'active' ? 'active, internal' : row.status;
|
|
380
|
+
lines.push(`| ${code} | ${row.summary} | ${status} |`);
|
|
381
|
+
}
|
|
382
|
+
lines.push('');
|
|
383
|
+
lines.push('## Retired numbers');
|
|
384
|
+
lines.push('');
|
|
385
|
+
lines.push('These numbers were removed from the registry. They stay reserved. A later removal is added here. The registry and the lock file do not list them.');
|
|
386
|
+
lines.push('');
|
|
387
|
+
lines.push('| Code | Summary | Status |');
|
|
388
|
+
lines.push('|---|---|---|');
|
|
389
|
+
for (const code of retired) {
|
|
390
|
+
lines.push(`| ${code} | ${RETIRED_CODES[code].summary} | retired |`);
|
|
391
|
+
}
|
|
392
|
+
lines.push('');
|
|
393
|
+
return lines.join('\n');
|
|
394
|
+
}
|