### Run an Example Project Source: https://github.com/hacker-cb/1c-odata/blob/master/examples/README.md Use this command to run a specific example project within the workspace. Replace `` with the actual name of the example directory. ```bash pnpm --filter demo ``` -------------------------------- ### Install @1c-odata/cli and @1c-odata/client Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/cli/README.md Install the CLI and client packages as development dependencies. ```bash pnpm add -D @1c-odata/cli @1c-odata/client ``` -------------------------------- ### Install @1c-odata/client and CLI Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/client/README.md Install the client package for runtime use and the CLI package for generating types from $metadata. ```bash pnpm add @1c-odata/client pnpm add -D @1c-odata/cli ``` -------------------------------- ### Install @1c-odata/client and @1c-odata/metadata Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/metadata/README.md Install the necessary packages for using the 1c-odata client and metadata functionalities. ```bash pnpm add @1c-odata/client @1c-odata/metadata ``` -------------------------------- ### Run Dynamic Example Source: https://github.com/hacker-cb/1c-odata/blob/master/examples/dynamic/README.md Sets the environment variable for the OData URL and runs the dynamic example using pnpm. Ensure reserved characters in credentials are percent-encoded. ```bash export ONEC_EXAMPLE_DYNAMIC_URL=http://user:password@host/base/odata/standard.odata pnpm --filter dynamic-example demo ``` -------------------------------- ### Install and Build Project Dependencies Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Install project dependencies and build the project using pnpm. These commands are essential for the development workflow. ```bash pnpm install pnpm turbo build pnpm turbo test:unit pnpm turbo typecheck pnpm biome ci . ``` -------------------------------- ### Install Dependencies and Configure Authentication Source: https://github.com/hacker-cb/1c-odata/blob/master/examples/basic/README.md Installs project dependencies and configures the authentication URL. The URL can be exported as an environment variable or placed in a .env.local file. ```bash # 1. Install workspace deps (from repo root) pnpm install # 2. Configure auth via single URL with embedded credentials. # Either export, or put it in `.env.local` next to `1c-odata.config.ts`. # The CLI (`fetch`/`generate`) auto-sources both `.env` and `.env.local` # (later overrides earlier); `pnpm demo` loads only `.env.local`. export ONEC_EXAMPLE_BASIC_URL='http://your-username:your-password@1c.example.com/erp/odata/standard.odata' ``` -------------------------------- ### Quick Start: Initialize Client and Query Data Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/client/README.md Demonstrates how to initialize the OData client using connection details and perform a query with filtering and top limit. Assumes generated client code exists. ```typescript import { clientOptionsFromConnection, defineConnection, parseConnectionUrl } from '@1c-odata/client' import { and, any } from '@1c-odata/client/filter' import { createClient } from '../generated/trade/client.js' import type { Document_РеализацияТоваровУслуг } from '../generated/trade/index.js' const url = process.env.ONEC_URL if (!url) throw new Error('Set ONEC_URL') const conn = defineConnection({ ...parseConnectionUrl(url), serverTimezone: 'Europe/Moscow' }) // `createClient` (generated) auto-loads the sibling `__metadata.json` and wires // the `Functions` generic — DateTime / Int64 / ValueStorage handling is on. const trade = await createClient(clientOptionsFromConnection(conn)) const { value: docs } = await trade .query('Document_РеализацияТоваровУслуг') .filter((f) => and(f.Date.year().eq(2025), any(f.Товары, (t) => t.Сумма.gt(10000)))) .top(50) .get() ``` -------------------------------- ### Local Integration Test Configuration Source: https://github.com/hacker-cb/1c-odata/blob/master/snapshots/README.md This example shows the necessary environment variables to configure local integration tests for 1C OData. It includes enabling writes, setting OData service URLs for specific fixtures, and configuring proxy settings if needed. ```text ONEC_TESTS_ALLOW_WRITES=true ONEC_TRADE_V11_5_URL=http://user:pass@host/path/odata/standard.odata ONEC_BP_V3_0_URL=http://user:pass@host/path/odata/standard.odata HTTP_PROXY=http://proxy.example.com:8080 # only if behind a corporate proxy HTTPS_PROXY=http://proxy.example.com:8080 # mirror for HTTPS fixture URLs ``` -------------------------------- ### Configure Git Attributes for UTF-8 Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Set up `.gitattributes` for cross-platform compatibility, ensuring correct handling of Cyrillic filenames and UTF-8 encoding. This is a one-time project setup. ```text # .gitattributes * text=auto eol=lf *.ts text working-tree-encoding=UTF-8 ``` -------------------------------- ### Query Last Information Register Slice Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Get the last slice of data from an InformationRegister_ЦеныНоменклатуры at or before a specified date. Requires a Period object with a single date. ```typescript // InformationRegister — last slice at/before a date const prices = await client .register('InformationRegister_ЦеныНоменклатуры') .sliceLast({ Period: new Date('2025-06-01') }) ``` -------------------------------- ### Integration Testing (Live) Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Executes live integration tests. This command is gated on the presence of a `.env.local` file and skips cleanly if it's not found. ```bash pnpm turbo test:integration:live ``` -------------------------------- ### Run Demos Source: https://github.com/hacker-cb/1c-odata/blob/master/examples/basic/README.md Executes the demo scripts. A `predemo` hook regenerates types from the metadata snapshot. Subsequent runs are skipped if inputs are unchanged. ```bash # 4. Run the demos. The `predemo` hook regenerates types from # `metadata/default.xml`; subsequent runs are a no-op when inputs # are unchanged (smart-skip via `__metadata.json`). pnpm --filter basic-example demo ``` -------------------------------- ### Fetch Metadata and Generate Types Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/cli/README.md Execute the fetch and generate commands using pnpm. Ensure the ONEC_URL environment variable is set. ```bash export ONEC_URL=http://u:p@1c.example.com/odata/standard.odata pnpm 1c-odata fetch pnpm 1c-odata generate ``` -------------------------------- ### Unit Testing Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Runs fast and deterministic unit tests using Vitest for all packages. ```bash pnpm turbo test:unit ``` -------------------------------- ### Configure Network Proxy and TLS Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Set Node.js environment variables for process-wide TLS verification, HTTP proxy, and corporate CAs. Use `NODE_TLS_REJECT_UNAUTHORIZED=0` only for development. ```bash export NODE_EXTRA_CA_CERTS=/path/to/corp-ca.pem export HTTP_PROXY=http://user:pass@corp-proxy.example.com:8080 export HTTPS_PROXY=$HTTP_PROXY export NO_PROXY=localhost,127.0.0.1 export NODE_USE_ENV_PROXY=1 # or `node --use-env-proxy app.js` export NODE_TLS_REJECT_UNAUTHORIZED=0 # DEV ONLY — never in production ``` -------------------------------- ### Workspace Build Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Builds all packages in the workspace using Turbo. This command is typically used for production builds. ```bash pnpm turbo build ``` -------------------------------- ### Create a schema-less OData client Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Instantiate an OData client with only a URL and credentials, without a predefined schema. This client uses UntypedEntity and handles data heuristically. ```typescript import { BasicAuth, ODataV3Client, type UntypedEntity } from '@1c-odata/client' const client = new ODataV3Client({ baseUrl: 'http://1c.example.com/base/odata/standard.odata', auth: BasicAuth({ username: 'user', password: 'pass' }), serverTimezone: 'Europe/Moscow', }) const { value } = await client.query('Catalog_Номенклатура').top(10).get() await client.entity('Document_Заказ', key).patch({ Дата: new Date() }) // → naive ISO in serverTimezone ``` -------------------------------- ### Configure 1c-odata CLI Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Define build-time configuration for the 1c-odata CLI, including connection details and data inclusion patterns. Ensure the ONEC_URL environment variable is set. ```typescript import { parseConnectionUrl } from '@1c-odata/client' import { defineCodegenConfig } from '@1c-odata/cli' const url = process.env.ONEC_URL if (!url) throw new Error('Set ONEC_URL (format: http://user:pwd@host/path)') export default defineCodegenConfig({ targets: { trade: { connection: { ...parseConnectionUrl(url), serverTimezone: 'Europe/Moscow', // REQUIRED IANA timezone; no default }, include: ['Catalog_*', 'Document_*'], }, }, }) ``` -------------------------------- ### Create a dynamic OData client Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Dynamically create an OData client by fetching the metadata at runtime. This client supports full DateTime, Int64, and ValueStorage handling, along with write validation. ```typescript import { createDynamicClient } from '@1c-odata/metadata' const client = await createDynamicClient( { baseUrl: 'http://1c.example.com/base/odata/standard.odata', auth: { username: 'user', password: 'pass' }, serverTimezone: 'Europe/Moscow', }, { validateOnWrite: true }, ) const { value } = await client.query('Catalog_Валюты').top(5).get() ``` -------------------------------- ### Fetch Metadata Snapshot Source: https://github.com/hacker-cb/1c-odata/blob/master/examples/basic/README.md Fetches a metadata snapshot from the OData service. This should be run once after any metadata changes. Ensure you run the script directly (`run fetch`) and not via pnpm's built-in fetch. ```bash # 3. Fetch metadata snapshot (run once per metadata change — network call). # `run fetch` (not bare `pnpm --filter basic-example fetch`) — the latter # invokes pnpm's built-in fetch command, not the package.json script. pnpm --filter basic-example run fetch ``` -------------------------------- ### Integration Testing (Write) Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Runs integration tests that require write permissions. This command is gated on the `ONEC_TESTS_ALLOW_WRITES=true` environment variable. ```bash pnpm turbo test:integration:write ``` -------------------------------- ### Query Top 5 Currencies by Code Source: https://github.com/hacker-cb/1c-odata/blob/master/examples/basic/README.md Demonstrates fetching the top 5 currencies based on their Code using the `.get()` method on the client. ```typescript // src/demos/currencies.ts // Top 5 currencies by Code await client.query('Currencies').get({ top: 5 }) ``` -------------------------------- ### Create Dynamic OData Client Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/metadata/README.md Dynamically creates an OData V3 client by downloading metadata, building an index, and enabling write validation. Use this for runtime interaction with 1C:Enterprise OData services. ```typescript import { createDynamicClient } from '@1c-odata/metadata' const client = await createDynamicClient( { baseUrl: 'http://1c.example.com/base/odata/standard.odata', auth: { username: 'user', password: 'pass' }, serverTimezone: 'Europe/Moscow', }, { validateOnWrite: true }, ) const { value } = await client.query('Catalog_Валюты').top(5).get() ``` -------------------------------- ### Use Typed Client for Data Fetching Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Initialize the typed client with connection details and use it to query data, applying filters and limits. The client handles type conversions for specific data types. ```typescript import { clientOptionsFromConnection, defineConnection, parseConnectionUrl } from '@1c-odata/client' import { and, any } from '@1c-odata/client/filter' import { createClient } from '../generated/trade/client.js' import type { Document_РеализацияТоваровУслуг } from '../generated/trade/index.js' // The runtime builds its own Connection (from env, DB, vault, …) — it does NOT // import 1c-odata.config.ts, which exists only for the CLI. const url = process.env.ONEC_URL if (!url) throw new Error('Set ONEC_URL') const conn = defineConnection({ ...parseConnectionUrl(url), serverTimezone: 'Europe/Moscow' }) // `createClient` is generated: it auto-loads the sibling `__metadata.json` and // wires the `Functions` generic, so DateTime / Int64 / ValueStorage handling is on. const trade = await createClient(clientOptionsFromConnection(conn)) const { value: docs } = await trade .query('Document_РеализацияТоваровУслуг') .filter((f) => and(f.Date.year().eq(2025), any(f.Товары, (t) => t.Сумма.gt(10000)))) .top(50) .get() ``` -------------------------------- ### Stream Items with Pagination Source: https://github.com/hacker-cb/1c-odata/blob/master/examples/basic/README.md Demonstrates streaming up to 20 items with a page size of 5, resulting in 4 HTTP requests. This respects user-defined `.top()` and `.skip()` from the builder. ```typescript // src/demos/items-stream.ts // 20 items via .stream({ pageSize: 5 }) = 4 HTTP requests await client.query('Items').stream({ pageSize: 5 }).get({ top: 20 }) ``` -------------------------------- ### Review and Commit Snapshot Changes Source: https://github.com/hacker-cb/1c-odata/blob/master/snapshots/README.md After refreshing snapshots, these commands are used to review the changes, stage the updated snapshot file, and commit it with a descriptive message. ```bash git diff -- snapshots/ git add snapshots/.xml git commit -m "snapshots: refresh " ``` -------------------------------- ### Changeset Add Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Adds a new release note for consumers of the project. This is part of the versioning and changelog process. ```bash pnpm changeset ``` -------------------------------- ### Register MCP Server in Client Configuration Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/mcp/README.md Configure your MCP client to use the 1c-odata server by adding this JSON configuration to your project's `.mcp.json`, `~/.claude.json`, or `claude_desktop_config.json`. ```jsonc { "mcpServers": { "1c-odata": { "command": "npx", "args": ["-y", "@1c-odata/mcp", "serve"] } } } ``` -------------------------------- ### Query Top 10 Items with Filter, Select, and OrderBy Source: https://github.com/hacker-cb/1c-odata/blob/master/examples/basic/README.md Shows how to query the top 10 items, applying filters, selecting specific fields, and ordering the results. ```typescript // src/demos/items.ts // Top 10 items await client.query('Items') .select(['Code', 'Description', 'Сумма']) .filter(f => f.Сумма.gt(0)) .orderBy('Code', 'asc') .get({ top: 10 }) ``` -------------------------------- ### Package Linting Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Performs package linting using `publint` and `arethetypeswrong` to check package integrity and type definitions. ```bash pnpm turbo package:lint ``` -------------------------------- ### Add a Connection Interactively Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/mcp/README.md Use this command to add a new connection to your 1c-odata instance interactively. It will prompt for connection details and save them securely. ```console $ npx @1c-odata/mcp add my-base Connection name: my-base Base URL: https://your-1c-host/base/odata/standard.odata/ Login: your-user Password: ******** # typed with no echo — never stored in shell history or argv Server timezone [Europe/Moscow]: Europe/Moscow Verifying connection… OK ✓ Connection "my-base" saved. config: ~/.config/1c-odata/config.json password: OS keychain ``` -------------------------------- ### Accessing Register Balances Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/client/README.md Demonstrates how to query the balance of an accumulation register using the client's register method with a specified period. ```typescript const balance = await trade .register('AccumulationRegister_ТоварыНаСкладах') .balance({ Period: new Date('2025-01-01') }) ``` -------------------------------- ### Biome CI Check Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Runs Biome in CI mode to perform linting and format checking across the entire project. Acts as a CI gate. ```bash pnpm biome ci . ``` -------------------------------- ### Biome Format Fix Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Uses Biome to check and automatically fix linting and formatting issues in the project. ```bash pnpm biome check --write . ``` -------------------------------- ### Cache and reuse metadata index Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Fetch the metadata index and cache it for subsequent use to avoid re-downloading. This is useful for multi-tenant servers. ```typescript import { ODataV3Client, clientOptionsFromConnection, parseMetadataIndex } from '@1c-odata/client' import { fetchMetadataIndex } from '@1c-odata/metadata' const cached = await cache.get(key) const metadataIndex = cached ? parseMetadataIndex(JSON.parse(cached), key) : await fetchMetadataIndex(conn) if (!cached) await cache.set(key, JSON.stringify(metadataIndex)) // ~1 MB JSON per base const client = new ODataV3Client({ ...clientOptionsFromConnection(conn), metadataIndex }) ``` -------------------------------- ### End-to-End (E2E) Testing Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Runs end-to-end tests for the CLI. These tests use Mock Service Worker (MSW) for stubbing network requests. ```bash pnpm turbo test:e2e ``` -------------------------------- ### Pre-push Git Hook Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md The pre-push git hook runs TypeScript type checking for packages within the 'packages' directory using Turbo. ```bash pre-push runs `pnpm turbo typecheck --filter='./packages/*'` ``` -------------------------------- ### Single Unit Test Execution Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Executes a single unit test file using Vitest. The `-F` flag filters for specific workspace packages. ```bash pnpm -F @1c-odata/client vitest run test/unit/filter.test.ts ``` -------------------------------- ### Integration Testing (Offline) Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Executes integration tests that rely on codegen and parser against snapshot files. These tests are designed to run offline. ```bash pnpm turbo test:integration:offline ``` -------------------------------- ### Advanced Filtering with Logical Operators Source: https://github.com/hacker-cb/1c-odata/blob/master/examples/basic/README.md Illustrates using advanced filter syntax with logical operators like `and`, `or`, `any`, `all`, and `not`, along with comparison operators like `eq` and `gt`. ```typescript // New filter API: import { and, or, any, all, not, raw } from '@1c-odata/client/filter' // then .filter((f) => and(f.Code.eq('X'), f.Сумма.gt(0))) // Example usage within a query: await client.query('Items') .filter((f) => ( f.Code.eq('SomeCode') )) .get() ``` -------------------------------- ### Refresh All 1C OData Fixtures Source: https://github.com/hacker-cb/1c-odata/blob/master/snapshots/README.md This command refreshes all EDMX metadata snapshots for the 1C OData project fixtures. It is useful for updating all test fixtures at once. ```bash pnpm snapshots:refresh ``` -------------------------------- ### Add a Connection Non-interactively with Password from Environment Variable Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/mcp/README.md This method adds a connection non-interactively by supplying the password via an environment variable. This is useful for CI/CD pipelines and secret management systems. ```bash # or store only the non-secret config and supply the password via env at runtime: ONEC_MY_BASE_PASSWORD=… npx @1c-odata/mcp add my-base --url https://host/base/odata/standard.odata/ --login user ``` -------------------------------- ### Query Stock Balance Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Retrieve the stock balance for a specific period from the AccumulationRegister_ТоварыНаСкладах. Supports options like $top for limiting results. ```typescript // AccumulationRegister — stock balance at a date, turnovers over a range const balance = await client .register('AccumulationRegister_ТоварыНаСкладах') .balance({ Period: new Date('2025-01-01') }, { top: 100 }) ``` -------------------------------- ### Pre-commit Git Hook Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md The pre-commit git hook runs `pnpm lint-staged`, which uses Biome to check and fix staged files. ```bash pre-commit runs `pnpm lint-staged` ``` -------------------------------- ### Add a Connection Non-interactively with Password from Stdin Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/mcp/README.md This command adds a connection without interactive prompts, suitable for scripts or CI. The password is provided via standard input, which is not visible in process lists. ```bash # password from stdin (not visible in `ps`): npx @1c-odata/mcp add my-base --url https://host/base/odata/standard.odata/ --login user --password-stdin <<<"$PW" ``` -------------------------------- ### Configure OData Connection Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/cli/README.md Define the codegen configuration, including connection details and entity inclusions. The connection URL is expected to be set in the ONEC_URL environment variable. ```typescript import { parseConnectionUrl } from '@1c-odata/client' import { defineCodegenConfig } from '@1c-odata/cli' const url = process.env.ONEC_URL if (!url) throw new Error('Set ONEC_URL (format: http://user:pwd@host/path)') export default defineCodegenConfig({ targets: { trade: { connection: { ...parseConnectionUrl(url), serverTimezone: 'Europe/Moscow', }, include: ['Catalog_*', 'Document_*'], }, }, }) ``` -------------------------------- ### Error Handling with ODataError Subclasses Source: https://github.com/hacker-cb/1c-odata/blob/master/packages/client/README.md Shows how to catch and handle various OData errors, including HTTP errors and specific OData error types, using try-catch blocks. ```typescript import { HTTPError, ODataError } from '@1c-odata/client' try { await trade.query('Document_РеализацияТоваровУслуг').get() } catch (e) { if (e instanceof HTTPError) console.error(`HTTP ${e.status}`, e.request) // { method, url }, no headers else if (e instanceof ODataError) console.error(e.name, e.message) } ``` -------------------------------- ### Refresh a Specific 1C OData Fixture Source: https://github.com/hacker-cb/1c-odata/blob/master/snapshots/README.md This command refreshes the EDMX metadata snapshot for a single, specified 1C OData fixture. Use the `--connection` flag followed by the fixture ID. ```bash pnpm snapshots:refresh -- --connection trade_v11.5 ``` -------------------------------- ### TypeScript Type Checking Command Source: https://github.com/hacker-cb/1c-odata/blob/master/CLAUDE.md Performs TypeScript type checking across all packages in the workspace without emitting JavaScript files. Useful for CI gates. ```bash pnpm turbo typecheck ``` -------------------------------- ### Query Stock Turnovers Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Retrieve stock turnovers over a specified date range from the AccumulationRegister_ТоварыНаСкладах. The Period object should contain 'from' and 'to' dates. ```typescript const turnovers = await client .register('AccumulationRegister_ТоварыНаСкладах') .turnovers({ Period: { from: new Date('2025-01-01'), to: new Date('2025-12-31') } }) ``` -------------------------------- ### Query Accounting Register Debit/Credit Turnovers Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Retrieve debit and credit turnovers for a specified period from the AccountingRegister_Хозрасчетный. The Period object must include 'from' and 'to' dates. ```typescript // AccountingRegister — debit/credit turnovers over a range const drcr = await client .register('AccountingRegister_Хозрасчетный') .drCrTurnovers({ Period: { from: new Date('2025-01-01'), to: new Date('2025-03-31') } }) ``` -------------------------------- ### Handle Specific OData Errors Source: https://github.com/hacker-cb/1c-odata/blob/master/README.md Catch and handle different types of OData errors, such as ConcurrencyError, BusinessError, TimeoutError, HTTPError, and ValidationError. Ensure to catch more specific errors before the general ODataError. ```typescript import { ODataError, HTTPError, BusinessError, ConcurrencyError, TimeoutError, ValidationError } from '@1c-odata/client' try { await client.entity('Document_Заказ', key).patch({ Проведен: true }, { expectVersion }) } catch (e) { if (e instanceof ConcurrencyError) { // optimistic-concurrency guard tripped: DataVersion changed — refetch and retry } else if (e instanceof BusinessError) { console.error(`1С business rule: ${e.code} ${e.odata?.message}`) // HTTP 500, code "-1" } else if (e instanceof TimeoutError) { console.error(`timed out after ${e.timeoutMs}ms`) } else if (e instanceof HTTPError) { console.error(`HTTP ${e.status} ${e.statusText} (${e.errorFormat})`) } else if (e instanceof ValidationError) { console.error(e.issues) // only with validateOnWrite — thrown before any HTTP request } else if (e instanceof ODataError) { console.error(`${e.name}: ${e.message}`, e.request) // request is { method, url } — never headers } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.