Skip to content

fix: dummy override errors #650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 26, 2024
Merged
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
5 changes: 5 additions & 0 deletions .changeset/fair-pens-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@opennextjs/aws": patch
---

fix: dummy override errors
7 changes: 4 additions & 3 deletions packages/open-next/src/overrides/incrementalCache/dummy.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import type { IncrementalCache } from "types/overrides";
import { IgnorableError } from "utils/error";

const dummyIncrementalCache: IncrementalCache = {
name: "dummy",
get: async () => {
throw new Error("Dummy cache is not implemented");
throw new IgnorableError('"Dummy" cache does not cache anything');
},
set: async () => {
throw new Error("Dummy cache is not implemented");
throw new IgnorableError('"Dummy" cache does not cache anything');
},
delete: async () => {
throw new Error("Dummy cache is not implemented");
throw new IgnorableError('"Dummy" cache does not cache anything');
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { ProxyExternalRequest } from "types/overrides";
import { FatalError } from "utils/error";

const DummyProxyExternalRequest: ProxyExternalRequest = {
name: "dummy",
proxy: async (_event) => {
throw new Error("This is a dummy implementation");
throw new FatalError("This is a dummy implementation");
},
};

Expand Down
3 changes: 2 additions & 1 deletion packages/open-next/src/overrides/queue/dummy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { Queue } from "types/overrides";
import { FatalError } from "utils/error";

const dummyQueue: Queue = {
name: "dummy",
send: async () => {
throw new Error("Dummy queue is not implemented");
throw new FatalError("Dummy queue is not implemented");
},
};

Expand Down
3 changes: 2 additions & 1 deletion packages/open-next/src/overrides/warmer/dummy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { Warmer } from "types/overrides";
import { FatalError } from "utils/error";

const dummyWarmer: Warmer = {
name: "dummy",
invoke: async (_: string) => {
throw new Error("Dummy warmer is not implemented");
throw new FatalError("Dummy warmer is not implemented");
},
};

Expand Down