serverless-offline 14.3.0 → 14.3.2
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/README.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Serverless Offline
|
|
2
2
|
|
|
3
|
+
<div align="center">
|
|
4
|
+
<p>
|
|
5
|
+
<sup>
|
|
6
|
+
<a href="https://github.com/sponsors/dherault">Serverless-offline is supported by the community.</a>
|
|
7
|
+
</sup>
|
|
8
|
+
</p>
|
|
9
|
+
<sup>
|
|
10
|
+
Special thanks to:
|
|
11
|
+
</sup>
|
|
12
|
+
<a href="https://arccode.dev?ref=so">
|
|
13
|
+
<div>
|
|
14
|
+
<img src="https://arccode.dev/images/logotype.png" height="64" alt="Arccode">
|
|
15
|
+
</div>
|
|
16
|
+
<b>
|
|
17
|
+
The first role-playing game for developers
|
|
18
|
+
</b>
|
|
19
|
+
<div>
|
|
20
|
+
XP, level ups and guilds. All while you work.
|
|
21
|
+
</div>
|
|
22
|
+
</a>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
3
25
|
<p>
|
|
4
26
|
<a href="https://www.serverless.com">
|
|
5
27
|
<img src="http://public.serverless.com/badges/v3.svg">
|
package/package.json
CHANGED
package/src/ServerlessOffline.js
CHANGED
|
@@ -645,7 +645,7 @@ export default class HttpServer {
|
|
|
645
645
|
/* RESPONSE SELECTION (among endpoint's possible responses) */
|
|
646
646
|
|
|
647
647
|
// Failure handling
|
|
648
|
-
let errorStatusCode = "
|
|
648
|
+
let errorStatusCode = "502"
|
|
649
649
|
|
|
650
650
|
if (err) {
|
|
651
651
|
const errorMessage = (err.message || err).toString()
|
|
@@ -655,17 +655,14 @@ export default class HttpServer {
|
|
|
655
655
|
if (found && found.length > 1) {
|
|
656
656
|
;[, errorStatusCode] = found
|
|
657
657
|
} else {
|
|
658
|
-
errorStatusCode = "
|
|
658
|
+
errorStatusCode = "502"
|
|
659
659
|
}
|
|
660
660
|
|
|
661
661
|
// Mocks Lambda errors
|
|
662
662
|
result = {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
type: err.constructor.name,
|
|
667
|
-
}),
|
|
668
|
-
statusCode: errorStatusCode,
|
|
663
|
+
errorMessage,
|
|
664
|
+
errorType: err.constructor.name,
|
|
665
|
+
stackTrace: this.#getArrayStackTrace(err.stack),
|
|
669
666
|
}
|
|
670
667
|
|
|
671
668
|
log.error(errorMessage)
|