8000 docs: Tweak README wording · aklinker1/zeta@f89b725 · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit f89b725

Browse files
committed
docs: Tweak README wording
1 parent 3b8ec53 commit f89b725

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ graph LR
386386

387387
There are two types of hooks: global and isolated.
388388

389-
- **Global**: These hooks are registered on the final, root application, regardless of where they are defined in your app's composition tree. They always run for every request that hits the server. Use these for cross-cutting concerns like logging or authentication.
389+
- **Global**: These hooks are registered on the final, top-level app, regardless of where they are defined in your app's composition tree. They always run for every request that hits the server. Use these for cross-cutting concerns like logging or authentication.
390390
- **Isolated**: These hooks only apply to routes defined on the _same app instance_, _after_ the hook is declared. They are perfect for setting up context or running middleware specific to a group of routes (e.g., a plugin).
391391

392392
Here's an example combining several different hooks:
@@ -556,7 +556,7 @@ const User = z
556556
});
557557
```
558558

559-
When building your app's spec, Zeta will find these `ref` properties and move the object schemas into `components.schemas`.
559+
When building your app's spec, Zeta will find these `ref` properties and move the object schemas into `components.schemas` automatically for you.
560560

561561
### Getting the OpenAPI Spec
562562

@@ -642,11 +642,11 @@ const app = createApp().use(apiApp);
642642
app.listen(3000);
643643
```
644644

645-
This lets you break your app up into smaller, reusable chunks. If a child app or plugin is used multiple times throughout the root app, it is automatically deduplicated so hooks are not ran more than once.
645+
This lets you break your app up into smaller, reusable chunks. If a child app or plugin is used multiple times throughout your app, it is automatically deduplicated so hooks are not ran more than once.
646646

647647
## Error Handling
648648

649-
By default, Zeta provides built-in error handling. It also provides useful error classes that, when thrown, set the specified http status code and maps the error to the response body.
649+
By default, Zeta provides built-in error handling, catching an errors thrown inside any handler or hook. It also provides useful error classes that, when thrown, set the specified http status code and maps the error to the response body.
650650

651651
```ts
652652
import { HttpError } from "@aklinker1/zeta/errors";
@@ -690,7 +690,7 @@ When a non-`HttpError` value is thrown, Zeta returns a `500 Internal Server Erro
690690

691691
## HttpStatus Codes
692692

693-
Zeta provides an enum of all HTTP status codes. You should use this instead of literal values.
693+
Zeta provides an enum of all HTTP status codes. You should use this instead of literal values for readability.
694694

695695
```diff
696696
import { HttpStatus } from "@aklinker1/zeta/status";
@@ -721,7 +721,7 @@ export type App = typeof app;
721721

722722
```ts
723723
// app/api-client.ts
724-
import type { App } from "../server/main.ts"; // IMPORTANT: Only import types from the serve 51A0 r
724+
import type { App } from "../server/main"; // IMPORTANT: Only import types from the server
725725
import { createClient } from "@aklinker1/zeta/client";
726726

727727
export const apiClient = createClient<App>(/* options */);

0 commit comments

Comments
 (0)
0