@riddix/hamh 2.1.0-alpha.436 → 2.1.0-alpha.438
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
|
@@ -445,6 +445,7 @@ Thank you to everyone who helps improve this project by reporting issues!
|
|
|
445
445
|
| [@JRCondat](https://github.com/JRCondat) | 💎 Thank you for your generous support! |
|
|
446
446
|
| Bonjon | 💎 Thank you for your generous support! |
|
|
447
447
|
| TobiR | 💎 Thank you for your generous support! |
|
|
448
|
+
| [@d3rby91](https://github.com/d3rby91) | 💎 Thank you for your generous support! |
|
|
448
449
|
| *Anonymous supporters* | 🙏 Thank you to those who prefer not to be named - your support is equally appreciated! |
|
|
449
450
|
|
|
450
451
|
### 🌟 Original Author
|
package/dist/backend/cli.js
CHANGED
|
@@ -149030,7 +149030,8 @@ function matterApi(bridgeService, haRegistry) {
|
|
|
149030
149030
|
const body = req.body;
|
|
149031
149031
|
const isValid = ajv.validate(createBridgeRequestSchema, body);
|
|
149032
149032
|
if (!isValid) {
|
|
149033
|
-
|
|
149033
|
+
const details = ajv.errors?.map((e) => `${e.instancePath || "/"}: ${e.message}`).join("; ") ?? "Unknown";
|
|
149034
|
+
res.status(400).json({ error: `Validation failed: ${details}` });
|
|
149034
149035
|
} else {
|
|
149035
149036
|
try {
|
|
149036
149037
|
const bridge = await bridgeService.create(body);
|
|
@@ -149071,7 +149072,8 @@ function matterApi(bridgeService, haRegistry) {
|
|
|
149071
149072
|
const body = req.body;
|
|
149072
149073
|
const isValid = ajv.validate(updateBridgeRequestSchema, body);
|
|
149073
149074
|
if (!isValid) {
|
|
149074
|
-
|
|
149075
|
+
const details = ajv.errors?.map((e) => `${e.instancePath || "/"}: ${e.message}`).join("; ") ?? "Unknown";
|
|
149076
|
+
res.status(400).json({ error: `Validation failed: ${details}` });
|
|
149075
149077
|
} else if (bridgeId !== body.id) {
|
|
149076
149078
|
res.status(400).send("Path variable `bridgeId` does not match `body.id`");
|
|
149077
149079
|
} else {
|