@hatchet-dev/typescript-sdk 0.15.3 → 0.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/clients/worker/handler.js +6 -6
- package/package.json +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -79,7 +79,7 @@ class WebhookHandler {
|
|
|
79
79
|
expressHandler({ secret }) {
|
|
80
80
|
return (req, res) => {
|
|
81
81
|
if (req.method === 'GET') {
|
|
82
|
-
res.
|
|
82
|
+
res.status(200).send(okMessage);
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
85
|
if (req.method === 'PUT') {
|
|
@@ -89,16 +89,16 @@ class WebhookHandler {
|
|
|
89
89
|
}
|
|
90
90
|
this.getHealthcheckResponse(body, req.headers['x-hatchet-signature'], secret)
|
|
91
91
|
.then((resp) => {
|
|
92
|
-
res.
|
|
92
|
+
res.status(200).json(resp);
|
|
93
93
|
})
|
|
94
94
|
.catch((err) => {
|
|
95
|
-
res.
|
|
95
|
+
res.status(500);
|
|
96
96
|
this.worker.logger.error(`Error handling request: ${err.message}`);
|
|
97
97
|
});
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
if (req.method !== 'POST') {
|
|
101
|
-
res.
|
|
101
|
+
res.status(405).json({ error: 'Method not allowed' });
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
let action = req.body;
|
|
@@ -107,10 +107,10 @@ class WebhookHandler {
|
|
|
107
107
|
}
|
|
108
108
|
this.handle(action, req.headers['x-hatchet-signature'], secret)
|
|
109
109
|
.then(() => {
|
|
110
|
-
res.
|
|
110
|
+
res.status(200);
|
|
111
111
|
})
|
|
112
112
|
.catch((err) => {
|
|
113
|
-
res.
|
|
113
|
+
res.status(500);
|
|
114
114
|
this.worker.logger.error(`Error handling request: ${err.message}`);
|
|
115
115
|
});
|
|
116
116
|
};
|
package/package.json
CHANGED
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HATCHET_VERSION = "0.15.
|
|
1
|
+
export declare const HATCHET_VERSION = "0.15.4";
|
package/version.js
CHANGED