docs: module call response, error codes, remove scenarios
CI / check (push) Successful in 16s
CI / publish (push) Has been skipped

This commit is contained in:
edmand46
2026-09-17 12:27:52 +03:00
parent 6f37b00fb4
commit 4ab406c5cd
3 changed files with 27 additions and 3 deletions
+11 -3
View File
@@ -83,7 +83,7 @@ Tokens are saved to the `TokenStore` automatically. The transport injects
| Catalog currencies | `client.catalog` | observable `SyncedState<Map<string, CatalogCurrency>>` |
| Player storage | `client.storage` + `.save(items)` / `.delete(type)` | observable + mutations |
| Project storage | `client.projectStorage` + `.save(items)` | observable + mutation |
| Modules | `client.modules.call(module, fn, args?)` | `CallModuleFunctionResponse` |
| Modules | `client.modules.call(module, fn, args?)` | `CallModuleFunctionClientResponse` (`{ result }`) |
| Resources | `client.resources(slug)` | `list` / `get` / `create` / `update` / `delete` |
There is no UGC, wallet service, or standalone economy service — wallets live
@@ -121,8 +121,16 @@ All SDK errors extend `RudderError` (optional machine-readable `code`):
- `RudderError` with `code: 'sdk/invalid-options'` (`SDK_ERROR_INVALID_OPTIONS`)
— constructor validation
Server error codes (`RudderErrorCodes`, from `src/generated/errors.ts`) are
compared with `error.code === RudderErrorCodes.forbidden`.
The platform error codes are `forbidden` and `row_referenced`
(`src/generated/errors.ts`, not exported from the package entry); compare
`error.code === 'forbidden'`.
`client.modules.call` resolves to `{ result }` only; console output and the
kernel call log never reach players. A module business error rejects with
`RudderHttpError` whose `status` is 422 and whose `code` is the module's own
code (the body is `{ error, code, requestId }`). Module codes are open strings
with no generated constants, so compare against the codes the module
documents. A module trap is a 500 and a timeout a 504, both without details.
## Reference files