-
+
Changelog
diff --git a/apps/www/components/changelog/changelog-grid-item.tsx b/apps/www/components/changelog/changelog-grid-item.tsx
index 2cf3166fc3..58d58600a9 100644
--- a/apps/www/components/changelog/changelog-grid-item.tsx
+++ b/apps/www/components/changelog/changelog-grid-item.tsx
@@ -62,7 +62,7 @@ export async function ChangelogGridItem({ className, changelog }: Props) {
diff --git a/apps/www/content/blog/how-unkey-treats-marketing.mdx b/apps/www/content/blog/how-unkey-treats-marketing.mdx
index 3ac1e87093..be795c9deb 100644
--- a/apps/www/content/blog/how-unkey-treats-marketing.mdx
+++ b/apps/www/content/blog/how-unkey-treats-marketing.mdx
@@ -166,7 +166,7 @@ Before you get upset, the community needs these events. They are the lifeblood o
- Frontend Horse Christmas Spectacular
- Github projects
-- Twitter Guesser game show... Which was hilarious.
+- X(Twitter) Guesser game show... Which was hilarious.
- Colby Fayock's site launch giveaways
Some of those events had no real value to Clerk, but they had value to the community. Which means they had value to Clerk.
@@ -225,4 +225,4 @@ You will notice everything is related to feedback and building relationships. Th
## Conclusion
-Traditional marketing is dead from Unkey's perspective, and I hope this blog post has helped you understand how we think about marketing and developer relations. If you have any questions, feel free to reach out to me on [Twitter](https://twitter.com/james_r_perkins) or [Email](james@unkey.dev).
+Traditional marketing is dead from Unkey's perspective, and I hope this blog post has helped you understand how we think about marketing and developer relations. If you have any questions, feel free to reach out to me on [X(Twitter)](https://x.com/james_r_perkins) or [Email](james@unkey.dev).
diff --git a/apps/www/content/changelog/2023-07-21.mdx b/apps/www/content/changelog/2023-07-21.mdx
index c8ea26716f..c0a8d33e0c 100644
--- a/apps/www/content/changelog/2023-07-21.mdx
+++ b/apps/www/content/changelog/2023-07-21.mdx
@@ -65,4 +65,4 @@ You can read about this in our [documentation](https://unkey.com/docs/api-refere
## Community Shoutout
-A huge shoutout to **[Wilfred Almeida](https://twitter.com/WilfredAlmeida_)** who spent some time creating the Go SDK. You can check out the Go code on [GitHub](https://github.com/WilfredAlmeida/unkey-go) and even help with some remaining items.
+A huge shoutout to **[Wilfred Almeida](https://x.com/WilfredAlmeida_)** who spent some time creating the Go SDK. You can check out the Go code on [GitHub](https://github.com/WilfredAlmeida/unkey-go) and even help with some remaining items.
From e1d4f442f07e10470aeba659fc10c0aab91702f7 Mon Sep 17 00:00:00 2001
From: Vardhaman Bhandari <97441447+Vardhaman619@users.noreply.github.com>
Date: Tue, 8 Oct 2024 13:29:31 +0000
Subject: [PATCH 2/4] deleted files in apps/engineering
---
apps/engineering/errors.mdx | 124 ------------------------------
apps/engineering/introduction.mdx | 8 --
apps/engineering/mint.json | 68 ----------------
3 files changed, 200 deletions(-)
delete mode 100644 apps/engineering/errors.mdx
delete mode 100644 apps/engineering/introduction.mdx
delete mode 100644 apps/engineering/mint.json
diff --git a/apps/engineering/errors.mdx b/apps/engineering/errors.mdx
deleted file mode 100644
index 5687c4f495..0000000000
--- a/apps/engineering/errors.mdx
+++ /dev/null
@@ -1,124 +0,0 @@
----
-title: Errors
-description: 'Error handling for Unkey APIs'
----
-
-Javascript's error handling is pretty horrible. Errors are thrown everywhere and rarely caught at the correct place.
-
-At Unkey we're counteracting this issue by explicitely returning errors where they may happen.
-
-Instead of guessing whether a function may throw an error, it's clerly typed and you can not forget to handle the error.
-Not all errors can be handled immediately and you can of course choose to escalate it further, but at least they won't be forgotten.
-
-
-## `@unkey/error`
-
-The `@unkey/error` package in `/internal/error` provides primitives for returning and handling errors as well as a few common error classes.
-
-Below will be a short introduction to each of the primitives
-
-### `Result`
-
-Functions should return a `Result` where the happy path response as well as all possible errors are strongly typed.
-
-```ts Example
-import {type Result, Ok, Err, BaseError } from "@unkey/error"
-
-class DivisionByZeroError extends BaseError {
- public type = "DivisionByZeroError"
- public retry = false
-}
-
-function divide(a: number, b: number): Result{
- if (b === 0){
- return Err(new DivisionByZeroError())
- }
- return Ok(a / b)
-}
-
-
-
-const { val: division, err } = divide(1, 0)
-if (err) {
- // handle error
-}
-// use division result
-```
-
-
-### `Ok(v: V)`
-
-A helper to return a valid result.
-`Ok()` can be used for void returns.
-
-### `Err(e: E)`
-
-A helper to return an error result.
-
-### `BaseError`
-
-The base error that all errors should extend from.
-
-Errors may specify:
-- any number of key-value context that will be useful to debug later
-- whether the error is retryable
-- a cause, which is the error that cause this error if you want to wrap it.
-
-```ts BaseError
-export abstract class BaseError extends Error {
- public abstract readonly type: ErrorType;
- public abstract readonly retry: boolean;
- public readonly cause: BaseError | undefined;
- public readonly context: TContext | undefined;
-```
-
-
-## Creating a new Error
-
-Here's an example of a `SchemaError` that might happen when `zod` invalidates a schema.
-
-The static `fromZod` constructor is a nice utility added specifically for this error.
-
-
-```ts schema-error.ts
-
-import type { ZodError } from "zod";
-import { generateErrorMessage } from "zod-error";
-import { BaseError } from "./base";
-
-/**
- * Parsing a permission query failed
- */
-export class SchemaError extends BaseError<{ raw: unknown }> {
- public readonly retry = false;
-
- static fromZod(e: ZodError, raw: unknown): SchemaError {
- const message = generateErrorMessage(e.issues, {
- maxErrors: 1,
- delimiter: {
- component: ": ",
- },
- path: {
- enabled: true,
- type: "objectNotation",
- label: "",
- },
- code: {
- enabled: true,
- label: "",
- },
- message: {
- enabled: true,
- label: "",
- },
- });
- return new SchemaError(message, {
- id: SchemaError.name,
- context: {
- raw: JSON.stringify(raw),
- },
- });
- }
-}
-
-```
\ No newline at end of file
diff --git a/apps/engineering/introduction.mdx b/apps/engineering/introduction.mdx
deleted file mode 100644
index 5fb2e5bbb9..0000000000
--- a/apps/engineering/introduction.mdx
+++ /dev/null
@@ -1,8 +0,0 @@
----
-title: Overview
-description: 'Welcome to the Unkey engineering docs!'
----
-
-## What are engienering docs?
-
-This is the place we collect decisions, guides and thoughts about building Unkey.
diff --git a/apps/engineering/mint.json b/apps/engineering/mint.json
deleted file mode 100644
index a8e359e33e..0000000000
--- a/apps/engineering/mint.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "$schema": "https://mintlify.com/schema.json",
- "name": "Unkey Engineering",
- "colors": {
- "primary": "#09090b",
- "light": "#EAE6E0",
- "dark": "#18181b",
- "background": {
- "light": "#fafaf9",
- "dark": "#0c0a09"
- }
- },
- "feedback": {
- "raiseIssue": true,
- "suggestEdit": true,
- "thumbsRating": true
- },
- "favicon": "/unkey.png",
- "topbarLinks": [
- {
- "name": "Discord",
- "url": "https://unkey.com/discord"
- },
- {
- "name": "Dashboard",
- "url": "https://app.unkey.com"
- }
- ],
- "topbarCtaButton": {
- "type": "github",
- "url": "https://github.com/unkeyed/unkey"
- },
- "tabs": [
- {
- "name": "RFCs",
- "url": "rfcs"
- }
- ],
- "navigation": [
- {
- "group": "Get Started",
- "pages": ["introduction"]
- },
- {
- "group": "Errors",
- "icon": "triangle-exclamation",
- "pages": ["errors"]
- },
- {
- "group": "Services",
- "icon": "vault",
- "pages": ["services/vault"]
- },
- {
- "group": "RFCs",
- "pages": ["rfcs/0001-retrieving-keys"]
- }
- ],
- "footerSocials": {
- "twitter": "https://x.com/unkeydev",
- "github": "https://github.com/unkeyed/unkey"
- },
- "analytics": {
- "posthog": {
- "apiKey": "phc_kCLW6KdzuihzMqTuJ6PNC4sHP7ipArtEAF8uUH2V5Yt"
- }
- }
-}
From fa06b512def78ac5ddc67db8a79e965137700b97 Mon Sep 17 00:00:00 2001
From: Vardhaman Bhandari <97441447+Vardhaman619@users.noreply.github.com>
Date: Wed, 9 Oct 2024 11:04:03 +0000
Subject: [PATCH 3/4] Revert "deleted files in apps/engineering"
This reverts commit e1d4f442f07e10470aeba659fc10c0aab91702f7.
---
apps/engineering/errors.mdx | 124 ++++++++++++++++++++++++++++++
apps/engineering/introduction.mdx | 8 ++
apps/engineering/mint.json | 68 ++++++++++++++++
3 files changed, 200 insertions(+)
create mode 100644 apps/engineering/errors.mdx
create mode 100644 apps/engineering/introduction.mdx
create mode 100644 apps/engineering/mint.json
diff --git a/apps/engineering/errors.mdx b/apps/engineering/errors.mdx
new file mode 100644
index 0000000000..5687c4f495
--- /dev/null
+++ b/apps/engineering/errors.mdx
@@ -0,0 +1,124 @@
+---
+title: Errors
+description: 'Error handling for Unkey APIs'
+---
+
+Javascript's error handling is pretty horrible. Errors are thrown everywhere and rarely caught at the correct place.
+
+At Unkey we're counteracting this issue by explicitely returning errors where they may happen.
+
+Instead of guessing whether a function may throw an error, it's clerly typed and you can not forget to handle the error.
+Not all errors can be handled immediately and you can of course choose to escalate it further, but at least they won't be forgotten.
+
+
+## `@unkey/error`
+
+The `@unkey/error` package in `/internal/error` provides primitives for returning and handling errors as well as a few common error classes.
+
+Below will be a short introduction to each of the primitives
+
+### `Result`
+
+Functions should return a `Result` where the happy path response as well as all possible errors are strongly typed.
+
+```ts Example
+import {type Result, Ok, Err, BaseError } from "@unkey/error"
+
+class DivisionByZeroError extends BaseError {
+ public type = "DivisionByZeroError"
+ public retry = false
+}
+
+function divide(a: number, b: number): Result{
+ if (b === 0){
+ return Err(new DivisionByZeroError())
+ }
+ return Ok(a / b)
+}
+
+
+
+const { val: division, err } = divide(1, 0)
+if (err) {
+ // handle error
+}
+// use division result
+```
+
+
+### `Ok(v: V)`
+
+A helper to return a valid result.
+`Ok()` can be used for void returns.
+
+### `Err(e: E)`
+
+A helper to return an error result.
+
+### `BaseError`
+
+The base error that all errors should extend from.
+
+Errors may specify:
+- any number of key-value context that will be useful to debug later
+- whether the error is retryable
+- a cause, which is the error that cause this error if you want to wrap it.
+
+```ts BaseError
+export abstract class BaseError extends Error {
+ public abstract readonly type: ErrorType;
+ public abstract readonly retry: boolean;
+ public readonly cause: BaseError | undefined;
+ public readonly context: TContext | undefined;
+```
+
+
+## Creating a new Error
+
+Here's an example of a `SchemaError` that might happen when `zod` invalidates a schema.
+
+The static `fromZod` constructor is a nice utility added specifically for this error.
+
+
+```ts schema-error.ts
+
+import type { ZodError } from "zod";
+import { generateErrorMessage } from "zod-error";
+import { BaseError } from "./base";
+
+/**
+ * Parsing a permission query failed
+ */
+export class SchemaError extends BaseError<{ raw: unknown }> {
+ public readonly retry = false;
+
+ static fromZod(e: ZodError, raw: unknown): SchemaError {
+ const message = generateErrorMessage(e.issues, {
+ maxErrors: 1,
+ delimiter: {
+ component: ": ",
+ },
+ path: {
+ enabled: true,
+ type: "objectNotation",
+ label: "",
+ },
+ code: {
+ enabled: true,
+ label: "",
+ },
+ message: {
+ enabled: true,
+ label: "",
+ },
+ });
+ return new SchemaError(message, {
+ id: SchemaError.name,
+ context: {
+ raw: JSON.stringify(raw),
+ },
+ });
+ }
+}
+
+```
\ No newline at end of file
diff --git a/apps/engineering/introduction.mdx b/apps/engineering/introduction.mdx
new file mode 100644
index 0000000000..5fb2e5bbb9
--- /dev/null
+++ b/apps/engineering/introduction.mdx
@@ -0,0 +1,8 @@
+---
+title: Overview
+description: 'Welcome to the Unkey engineering docs!'
+---
+
+## What are engienering docs?
+
+This is the place we collect decisions, guides and thoughts about building Unkey.
diff --git a/apps/engineering/mint.json b/apps/engineering/mint.json
new file mode 100644
index 0000000000..a8e359e33e
--- /dev/null
+++ b/apps/engineering/mint.json
@@ -0,0 +1,68 @@
+{
+ "$schema": "https://mintlify.com/schema.json",
+ "name": "Unkey Engineering",
+ "colors": {
+ "primary": "#09090b",
+ "light": "#EAE6E0",
+ "dark": "#18181b",
+ "background": {
+ "light": "#fafaf9",
+ "dark": "#0c0a09"
+ }
+ },
+ "feedback": {
+ "raiseIssue": true,
+ "suggestEdit": true,
+ "thumbsRating": true
+ },
+ "favicon": "/unkey.png",
+ "topbarLinks": [
+ {
+ "name": "Discord",
+ "url": "https://unkey.com/discord"
+ },
+ {
+ "name": "Dashboard",
+ "url": "https://app.unkey.com"
+ }
+ ],
+ "topbarCtaButton": {
+ "type": "github",
+ "url": "https://github.com/unkeyed/unkey"
+ },
+ "tabs": [
+ {
+ "name": "RFCs",
+ "url": "rfcs"
+ }
+ ],
+ "navigation": [
+ {
+ "group": "Get Started",
+ "pages": ["introduction"]
+ },
+ {
+ "group": "Errors",
+ "icon": "triangle-exclamation",
+ "pages": ["errors"]
+ },
+ {
+ "group": "Services",
+ "icon": "vault",
+ "pages": ["services/vault"]
+ },
+ {
+ "group": "RFCs",
+ "pages": ["rfcs/0001-retrieving-keys"]
+ }
+ ],
+ "footerSocials": {
+ "twitter": "https://x.com/unkeydev",
+ "github": "https://github.com/unkeyed/unkey"
+ },
+ "analytics": {
+ "posthog": {
+ "apiKey": "phc_kCLW6KdzuihzMqTuJ6PNC4sHP7ipArtEAF8uUH2V5Yt"
+ }
+ }
+}
From 4d65e8123f43e8643177c4023b1286373981b4fe Mon Sep 17 00:00:00 2001
From: Vardhaman Bhandari <97441447+Vardhaman619@users.noreply.github.com>
Date: Fri, 11 Oct 2024 11:55:17 +0530
Subject: [PATCH 4/4] fix typo in how-unkey-treats-marketing.mdx
---
apps/www/content/blog/how-unkey-treats-marketing.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/www/content/blog/how-unkey-treats-marketing.mdx b/apps/www/content/blog/how-unkey-treats-marketing.mdx
index be795c9deb..6abb38ede2 100644
--- a/apps/www/content/blog/how-unkey-treats-marketing.mdx
+++ b/apps/www/content/blog/how-unkey-treats-marketing.mdx
@@ -166,7 +166,7 @@ Before you get upset, the community needs these events. They are the lifeblood o
- Frontend Horse Christmas Spectacular
- Github projects
-- X(Twitter) Guesser game show... Which was hilarious.
+- Twitter Guesser game show... Which was hilarious.
- Colby Fayock's site launch giveaways
Some of those events had no real value to Clerk, but they had value to the community. Which means they had value to Clerk.