Skip to content

Commit

Permalink
chore (ts client): Add link to troubleshooting guide in the MissingHe…
Browse files Browse the repository at this point in the history
…adersError error (#2016)
  • Loading branch information
kevin-dp authored Nov 21, 2024
1 parent 9718ccc commit 1faa79b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-hornets-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@electric-sql/client": patch
---

Add link to troubleshooting guide in the MissingHeadersError.
1 change: 1 addition & 0 deletions packages/typescript-client/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class MissingHeadersError extends Error {
msg += `- ${h}\n`
})
msg += `\nThis is often due to a proxy not setting CORS correctly so that all Electric headers can be read by the client.`
msg += `\nFor more information visit the troubleshooting guide: /docs/guides/troubleshooting/missing-headers`
super(msg)
}
}
7 changes: 4 additions & 3 deletions website/public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ https://next.electric-sql.com/* https://electric-sql.com/:splat 301!

# Shortpaths for nice links

/docs /docs/intro
/intro /docs/intro
/examples https://github.com/electric-sql/electric/tree/main/examples
/docs /docs/intro
/intro /docs/intro
/examples https://github.com/electric-sql/electric/tree/main/examples
/docs/guides/troubleshooting/missing-headers /docs/guides/troubleshooting#missing-headers-mdash-why-is-the-client-complaining-about-missing-headers

# More links from legacy site

Expand Down

0 comments on commit 1faa79b

Please sign in to comment.