File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111} from "../../models/models" ;
1212import { asInsight } from "../../utils/insight" ;
1313import { sluggize } from "../../utils/url" ;
14- import { parseOrThrow , runWithHandleErrorIf } from "../handler" ;
14+ import { parseOrThrow , runWithHandleError } from "../handler" ;
1515import { generateForArticleOrPage } from "../metadata" ;
1616import { Renderer } from "./renderer" ;
1717
@@ -43,7 +43,7 @@ export default async function Page(req: any) {
4343 const { props } = await handler ( r ) ;
4444 return < Renderer { ...props } /> ;
4545 } ;
46- return runWithHandleErrorIf ( await fn ( req ) ) ;
46+ return runWithHandleError ( await fn ( req ) ) ;
4747}
4848
4949async function handler ( req : any ) {
Original file line number Diff line number Diff line change 33import { headers } from "next/headers" ;
44import { fetchArchives } from "../../api" ;
55import { Archive , ArchiveResponse } from "../../models/models" ;
6- import { parseOrThrow , runWithHandleErrorIf } from "../handler" ;
6+ import { parseOrThrow , runWithHandleError } from "../handler" ;
77import { Renderer } from "./renderer" ;
88
99export default async function Page ( req : any ) {
1010 const fn = async ( r : any ) : Promise < any > => {
1111 const { props } = await handler ( r ) ;
1212 return < Renderer { ...props } /> ;
1313 } ;
14- return runWithHandleErrorIf ( await fn ( req ) ) ;
14+ return runWithHandleError ( await fn ( req ) ) ;
1515}
1616
1717async function handler ( req : any ) {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import {
1313import { asInsight } from "../../../utils/insight" ;
1414import { isMatch } from "../../../utils/match" ;
1515import { sluggize } from "../../../utils/url" ;
16- import { parseOrThrow , runWithHandleErrorIf } from "../../handler" ;
16+ import { parseOrThrow , runWithHandleError } from "../../handler" ;
1717import { generateForArticleOrPage } from "../../metadata" ;
1818import { Renderer } from "./renderer" ;
1919
@@ -47,7 +47,7 @@ export default async function Page(req: any) {
4747 const { props } = await handler ( r ) ;
4848 return < Renderer { ...props } /> ;
4949 } ;
50- return runWithHandleErrorIf ( await fn ( req ) ) ;
50+ return runWithHandleError ( await fn ( req ) ) ;
5151}
5252
5353async function handler ( req : any ) {
Original file line number Diff line number Diff line change @@ -4,15 +4,15 @@ import { headers } from "next/headers";
44import { fetchArticles } from "../../api" ;
55import { getValidOrder , isRandomOrder } from "../../api/order" ;
66import { Article , ArticleResponseWithCount } from "../../models/models" ;
7- import { parseOrThrow , runWithHandleErrorIf } from "../handler" ;
7+ import { parseOrThrow , runWithHandleError } from "../handler" ;
88import { Renderer } from "./renderer" ;
99
1010export default async function Page ( req : any ) {
1111 const fn = async ( r : any ) : Promise < any > => {
1212 const { props } = await handler ( r ) ;
1313 return < Renderer { ...props } /> ;
1414 } ;
15- return runWithHandleErrorIf ( await fn ( req ) ) ;
15+ return runWithHandleError ( await fn ( req ) ) ;
1616}
1717
1818async function handler ( req : any ) {
Original file line number Diff line number Diff line change 11import { notFound } from "next/navigation" ;
22
33// TODO: write test code
4- export async function runWithHandleErrorIf (
4+ export async function runWithHandleError (
55 fn : ( arg : any ) => React . FunctionComponent
66) : Promise < any > {
77 try {
Original file line number Diff line number Diff line change @@ -4,15 +4,15 @@ import { headers } from "next/headers";
44import { fetchArticles } from "../api" ;
55import { Order } from "../api/order" ;
66import { Article , ArticleResponseWithCount } from "../models/models" ;
7- import { parseOrThrow , runWithHandleErrorIf } from "./handler" ;
7+ import { parseOrThrow , runWithHandleError } from "./handler" ;
88import { Renderer } from "./renderer" ;
99
1010export default async function Page ( req : any ) {
1111 const fn = async ( r : any ) : Promise < any > => {
1212 const { props } = await handler ( r ) ;
1313 return < Renderer { ...props } /> ;
1414 } ;
15- return runWithHandleErrorIf ( await fn ( req ) ) ;
15+ return runWithHandleError ( await fn ( req ) ) ;
1616}
1717
1818async function handler ( req : any ) {
Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ import {
77 SeriresWithArticles ,
88 SeriresWithArticlesResponse
99} from "../../../models/models" ;
10- import { parseOrThrow , runWithHandleErrorIf } from "../../handler" ;
10+ import { parseOrThrow , runWithHandleError } from "../../handler" ;
1111import { Renderer } from "./renderer" ;
1212
1313export default async function Page ( req : any ) {
1414 const fn = async ( r : any ) : Promise < any > => {
1515 const { props } = await handler ( r ) ;
1616 return < Renderer { ...props } /> ;
1717 } ;
18- return runWithHandleErrorIf ( await fn ( req ) ) ;
18+ return runWithHandleError ( await fn ( req ) ) ;
1919}
2020
2121async function handler ( req : any ) {
Original file line number Diff line number Diff line change 33import { headers } from "next/headers" ;
44import { fetchAllSeries } from "../../api" ;
55import { Series , SeriesResponse } from "../../models/models" ;
6- import { parseOrThrow , runWithHandleErrorIf } from "../handler" ;
6+ import { parseOrThrow , runWithHandleError } from "../handler" ;
77import { Renderer } from "./renderer" ;
88
99export default async function Page ( req : any ) {
1010 const fn = async ( r : any ) : Promise < any > => {
1111 const { props } = await handler ( r ) ;
1212 return < Renderer { ...props } /> ;
1313 } ;
14- return runWithHandleErrorIf ( await fn ( req ) ) ;
14+ return runWithHandleError ( await fn ( req ) ) ;
1515}
1616
1717async function handler ( req : any ) {
Original file line number Diff line number Diff line change @@ -4,15 +4,15 @@ import { headers } from "next/headers";
44import { fetchTag } from "../../../api" ;
55import { getValidOrder , isRandomOrder } from "../../../api/order" ;
66import { Article , ArticleResponseWithCount } from "../../../models/models" ;
7- import { parseOrThrow , runWithHandleErrorIf } from "../../handler" ;
7+ import { parseOrThrow , runWithHandleError } from "../../handler" ;
88import { Renderer } from "./renderer" ;
99
1010export default async function Page ( req : any ) {
1111 const fn = async ( r : any ) : Promise < any > => {
1212 const { props } = await handler ( r ) ;
1313 return < Renderer { ...props } /> ;
1414 } ;
15- return runWithHandleErrorIf ( await fn ( req ) ) ;
15+ return runWithHandleError ( await fn ( req ) ) ;
1616}
1717
1818async function handler ( req : any ) {
Original file line number Diff line number Diff line change 33import { headers } from "next/headers" ;
44import { fetchAllTags } from "../../api" ;
55import { Tag } from "../../models/models" ;
6- import { parseOrThrow , runWithHandleErrorIf } from "../handler" ;
6+ import { parseOrThrow , runWithHandleError } from "../handler" ;
77import { Renderer } from "./renderer" ;
88
99export default async function Page ( req : any ) {
1010 const fn = async ( r : any ) : Promise < any > => {
1111 const { props } = await handler ( r ) ;
1212 return < Renderer { ...props } /> ;
1313 } ;
14- return runWithHandleErrorIf ( await fn ( req ) ) ;
14+ return runWithHandleError ( await fn ( req ) ) ;
1515}
1616
1717async function handler ( req : any ) {
You can’t perform that action at this time.
0 commit comments