replace early returns with NotFoundError

test /api/webhook/incoming-message
This commit is contained in:
m5r
2021-08-02 21:44:04 +08:00
parent 827ed9f1c0
commit 2cf53533a3
11 changed files with 223 additions and 28 deletions
+49 -5
View File
@@ -1567,7 +1567,7 @@
"integrity": "sha512-IHUfxSEDS9dDGqYwIW7wTN6tn/O8E0n5PcAHz9cAaBoZw6UpG20IG/YM3NNLaGPwPqgjBAFjIURzqoQs3rrtuw=="
},
"@fortawesome/fontawesome-pro": {
"version": "file:fontawesome/fortawesome-fontawesome-pro-5.15.3.tgz",
"version": "file:../virtual-phone.blitz/fontawesome/fortawesome-fontawesome-pro-5.15.3.tgz",
"integrity": "sha512-zrIqXGUiKI/qyEbNJV2Zw084XF6npZR/wzYgqzbGhdRdOT3ZcdseiKUvmW5eUTEkoL9/mCdT8WIzHVvP8wfMsQ=="
},
"@fortawesome/fontawesome-svg-core": {
@@ -1603,28 +1603,28 @@
}
},
"@fortawesome/pro-duotone-svg-icons": {
"version": "file:fontawesome/fortawesome-pro-duotone-svg-icons-5.15.3.tgz",
"version": "file:../virtual-phone.blitz/fontawesome/fortawesome-pro-duotone-svg-icons-5.15.3.tgz",
"integrity": "sha512-5BAT6uLAcYnsM76HLrP8SRuQh+N0eMy6VriEK9l9+6Xmm966wgXR2G9NZvua+W9qVv5GbPo2pXDqY6cUa/MoyA==",
"requires": {
"@fortawesome/fontawesome-common-types": "^0.2.35"
}
},
"@fortawesome/pro-light-svg-icons": {
"version": "file:fontawesome/fortawesome-pro-light-svg-icons-5.15.3.tgz",
"version": "file:../virtual-phone.blitz/fontawesome/fortawesome-pro-light-svg-icons-5.15.3.tgz",
"integrity": "sha512-HgQSTQIYsJku91yV/1txyr6IWfnQRnCNrqAo1UtPOkG53H7JPLO6l1GDsuhwjYJSIpjmqu7llgYAFOI/5cZWJA==",
"requires": {
"@fortawesome/fontawesome-common-types": "^0.2.35"
}
},
"@fortawesome/pro-regular-svg-icons": {
"version": "file:fontawesome/fortawesome-pro-regular-svg-icons-5.15.3.tgz",
"version": "file:../virtual-phone.blitz/fontawesome/fortawesome-pro-regular-svg-icons-5.15.3.tgz",
"integrity": "sha512-4CUIJWj+6ABnzYoYDECfB8hWHS/0FNeovaLqWZZMkaPfMGqC9tNSwWKZQUfBR2nwhEUeyMxtWo6mPJCh4Zz8YA==",
"requires": {
"@fortawesome/fontawesome-common-types": "^0.2.35"
}
},
"@fortawesome/pro-solid-svg-icons": {
"version": "file:fontawesome/fortawesome-pro-solid-svg-icons-5.15.3.tgz",
"version": "file:../virtual-phone.blitz/fontawesome/fortawesome-pro-solid-svg-icons-5.15.3.tgz",
"integrity": "sha512-stGmfbqLu54PghoxPjQ+BjblO/13EppJ8Fn9ceGZBz8K4lesvAhdMp2hZusXUz8VPuu/3pCHI84PbJ6wOKFYhQ==",
"requires": {
"@fortawesome/fontawesome-common-types": "^0.2.35"
@@ -9480,6 +9480,16 @@
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"isomorphic-unfetch": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz",
"integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==",
"dev": true,
"requires": {
"node-fetch": "^2.6.1",
"unfetch": "^4.2.0"
}
},
"istanbul-lib-coverage": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz",
@@ -11786,6 +11796,28 @@
}
}
},
"next-test-api-route-handler": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/next-test-api-route-handler/-/next-test-api-route-handler-2.0.2.tgz",
"integrity": "sha512-K0+VvPCvf3U5BWrTWBN8B8MktNT/iMSiTnYHaESFcQQ1QvhZ/HMSWxSpOWOIW73DmY6+aIfSc29ztMQo9L5WDw==",
"dev": true,
"requires": {
"debug": "^4.3.2",
"isomorphic-unfetch": "^3.1.0",
"test-listen": "^1.1.0"
},
"dependencies": {
"debug": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"dev": true,
"requires": {
"ms": "2.1.2"
}
}
}
},
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
@@ -15717,6 +15749,12 @@
"minimatch": "^3.0.4"
}
},
"test-listen": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/test-listen/-/test-listen-1.1.0.tgz",
"integrity": "sha512-OyEVi981C1sb9NX1xayfgZls3p8QTDRwp06EcgxSgd1kktaENBW8dO15i8v/7Fi15j0IYQctJzk5J+hyEBId2w==",
"dev": true
},
"text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -16177,6 +16215,12 @@
"resolved": "https://registry.npmjs.org/undici/-/undici-3.3.3.tgz",
"integrity": "sha512-JcC6p86DLPDne5vhm9nZ9N6hW/WPCtO8/NV+7YHS+x/mQ+NpWvtGxIt28ObBsySPec8FsabyiLPhmn7Htl9w3A=="
},
"unfetch": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz",
"integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==",
"dev": true
},
"unicode-canonical-property-names-ecmascript": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",