Skip to content

Commit 630fbae

Browse files
committed
fix(api): add missing return on notion error
1 parent a08bd6a commit 630fbae

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

src/runtime/server/api/notion/blocks/[id].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineEventHandler(async (event) => {
2727
}
2828
catch (error) {
2929
if (isNotionClientError(error)) {
30-
handleNotionError(error)
30+
return handleNotionError(error)
3131
}
3232
else {
3333
return {

src/runtime/server/api/notion/blocks/[id]/children.get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default defineEventHandler(async (event) => {
1515
}
1616
catch (error) {
1717
if (isNotionClientError(error)) {
18-
handleNotionError(error)
18+
return handleNotionError(error)
1919
}
2020
else {
2121
return {

src/runtime/server/api/notion/blocks/[id]/children.patch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineEventHandler(async (event) => {
1919
}
2020
catch (error) {
2121
if (isNotionClientError(error)) {
22-
handleNotionError(error)
22+
return handleNotionError(error)
2323
}
2424
else {
2525
return {

src/runtime/server/api/notion/databases/[id].get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default defineEventHandler(async (event) => {
1515
}
1616
catch (error) {
1717
if (isNotionClientError(error)) {
18-
handleNotionError(error)
18+
return handleNotionError(error)
1919
}
2020
else {
2121
return {

src/runtime/server/api/notion/databases/[id].patch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default defineEventHandler(async (event) => {
1616
}
1717
catch (error) {
1818
if (isNotionClientError(error)) {
19-
handleNotionError(error)
19+
return handleNotionError(error)
2020
}
2121
else {
2222
return {

src/runtime/server/api/notion/databases/[id]/query.post.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineEventHandler(async (event) => {
1919
}
2020
catch (error) {
2121
if (isNotionClientError(error)) {
22-
handleNotionError(error)
22+
return handleNotionError(error)
2323
}
2424
else {
2525
return {

src/runtime/server/api/notion/pages/[id].ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default defineEventHandler(async (event) => {
2929
}
3030
catch (error) {
3131
if (isNotionClientError(error)) {
32-
handleNotionError(error)
32+
return handleNotionError(error)
3333
}
3434
else {
3535
return {

src/runtime/server/api/notion/pages/[page_id]/properties/[property_id].get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default defineEventHandler(async (event) => {
1313
}
1414
catch (error) {
1515
if (isNotionClientError(error)) {
16-
handleNotionError(error)
16+
return handleNotionError(error)
1717
}
1818
else {
1919
return {

src/runtime/server/api/notion/search/search.post.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default defineEventHandler(async (event) => {
1313
}
1414
catch (error) {
1515
if (isNotionClientError(error)) {
16-
handleNotionError(error)
16+
return handleNotionError(error)
1717
}
1818
else {
1919
return {

src/runtime/server/api/notion/users/[id].get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default defineEventHandler(async (event) => {
1313
}
1414
catch (error) {
1515
if (isNotionClientError(error)) {
16-
handleNotionError(error)
16+
return handleNotionError(error)
1717
}
1818
else {
1919
return {

0 commit comments

Comments
 (0)