docs: module call response, error codes, remove scenarios
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user