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
5 changes: 1 addition & 4 deletions blocks/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { Block, BlockModule, InstanceOf } from "../engine/block.ts";
import { FieldResolver } from "../engine/core/resolver.ts";
import { singleFlight } from "../engine/core/utils.ts";
import type { DecofileProvider } from "../engine/decofile/provider.ts";
import { HttpError } from "../engine/errors.ts";

import type { ResolverMiddlewareContext } from "../engine/middleware.ts";
import type { State } from "../mod.ts";
import { logger } from "../observability/otel/config.ts";
Expand Down Expand Up @@ -106,9 +106,6 @@ export const wrapCaughtErrors = async <
try {
return await ctx.next!();
} catch (err) {
if (err instanceof HttpError) {
throw err;
}
return new Proxy({}, {
get: (_target, prop) => {
if (prop === "then") {
Expand Down
5 changes: 1 addition & 4 deletions blocks/section.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type {
PreactComponent,
} from "../engine/block.ts";
import type { Resolver } from "../engine/core/resolver.ts";
import { HttpError } from "../engine/errors.ts";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix formatting to pass CI.

The pipeline reports a deno fmt --check failure at this location. Run deno fmt to fix the formatting issue (likely a trailing whitespace or incorrect blank line).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@blocks/section.ts` at line 22, Run the formatter (deno fmt) on the section
module to fix the CI failing style check; remove any trailing whitespace or
incorrect blank line around the exported Section symbol (or the module's default
export) so formatting matches the project's style, then commit the formatted
file.


/**
* @widget none
Expand Down Expand Up @@ -155,9 +155,6 @@ export const createSectionBlock = (
).then((props) => {
return useExportDefaultComponentWithProps(props, httpCtx);
}).catch((err) => {
if (err instanceof HttpError) {
throw err;
}
const allowErrorBoundary = withMainComponent(alwaysThrow(err), props);
return allowErrorBoundary(
props as unknown as TProps,
Expand Down
5 changes: 1 addition & 4 deletions components/section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Context } from "../deco.ts";
import { type DeepPartial, Murmurhash3 } from "../deps.ts";
import type { ComponentFunc, ComponentMetadata } from "../engine/block.ts";
import type { FieldResolver } from "../engine/core/resolver.ts";
import { HttpError } from "../engine/errors.ts";

import { logger } from "../observability/otel/config.ts";
import { useFramework } from "../runtime/handler.tsx";
import { type Device, deviceOf } from "../utils/userAgent.ts";
Expand Down Expand Up @@ -70,9 +70,6 @@ export class ErrorBoundary extends Component<BoundaryProps, BoundaryState> {
override state = { error: null };

static override getDerivedStateFromError(error: Error) {
if (error instanceof HttpError) {
throw error;
}
return { error };
}

Expand Down
Loading