Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Better Fetch Documentation

A documentation site for [better-fetch](https://github.com/bekacru/better-fetch).
A documentation site for [better-fetch](https://github.com/better-auth/better-fetch).

## Development

Expand Down
2 changes: 1 addition & 1 deletion doc/app/layout.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const docsOptions: DocsLayoutProps = {
sidebar: {
collapsible: false,
footer: (
<Link href="https://github.com/bekacru/better-fetch" target="_blank">
<Link href="https://github.com/better-auth/better-fetch" target="_blank">
<GitHubLogoIcon width={16} height={16} />
</Link>
),
Expand Down
2 changes: 1 addition & 1 deletion doc/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function HomePage() {
Docs
</Button>
</Link>
<Link href="https://github.com/bekacru/better-fetch">
<Link href="https://github.com/better-auth/better-fetch">
<Button className="flex gap-2" variant="secondary">
<Icons.github />
Github
Expand Down
2 changes: 1 addition & 1 deletion doc/content/docs/handling-errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Handling Errors
---

## Default Error Type
Better fetch by default returns response errors as a value. By defaullt, the error object has 3 properties `status`, `statusText` and `message` properties.
Better fetch by default returns response errors as a value. By default, the error object has 3 properties `status`, `statusText` and `message` properties.

`status` and `statusText` are always defined. If the api returns a json error object it will be parsed and returned with the error object. By default `error` includes `message` property that can be string or undefined.

Expand Down
2 changes: 1 addition & 1 deletion packages/better-fetch/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getAuthHeader } from "./auth";
import { methods } from "./create-fetch";
import type { BetterFetchOption, FetchEsque } from "./types";

const JSON_RE = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
const JSON_RE = /^application\/(?:[\w!#$%&*.^`~+-]*\+)?json(;.+)?$/i;

export type ResponseType = "json" | "text" | "blob";
export function detectResponseType(request: Response): ResponseType {
Expand Down