Skip to content

Commit 011787e

Browse files
committed
added dump/error2b endpoint for apitest in fylr
see #75661
1 parent 9da96a1 commit 011787e

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

manifest.master.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,19 @@ extensions:
122122
- type: "value"
123123
value: "%_exec.pluginDir%/server/extension/error2.js"
124124

125+
dump/error2b:
126+
exec:
127+
service: "node"
128+
commands:
129+
- prog: "node"
130+
stdin:
131+
type: "body"
132+
stdout:
133+
type: "body"
134+
args:
135+
- type: "value"
136+
value: "%_exec.pluginDir%/server/extension/error2b.js"
137+
125138
dump/error3:
126139
exec:
127140
service: "node"

server/extension/error2b.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
(()=> {
2+
console.log(JSON.stringify(
3+
{
4+
"code": "custom.error",
5+
"err": "custom err", // this used to cause a parser error
6+
"error": "custom error",
7+
"statuscode": 402
8+
}
9+
))
10+
console.error("This error goes to STDERR")
11+
// pass status code here
12+
process.exit(499)
13+
})()

0 commit comments

Comments
 (0)