Commit b74351e7 authored by Matthias Weinreuter's avatar Matthias Weinreuter
Browse files

FLF-15: fixes in package(-lock).json, also more detailed warning in error case

parent 14a4c007
Pipeline #248841 passed with stages
in 2 minutes and 3 seconds
This diff is collapsed.
......@@ -3,6 +3,7 @@
"version": "1.0.0",
"private": true,
"proxy": "http://localhost:8000",
"allowedHosts": "all",
"dependencies": {
"@emotion/react": "11.8.2",
"@emotion/styled": "11.8.1",
......@@ -23,7 +24,7 @@
"react-query": "3.34.16",
"react-router": "6.3.0",
"react-router-hash-link": "2.4.3",
"react-scripts": "5.0.0",
"react-scripts": "5.0.1",
"react-select": "5.4.0",
"typescript": "4.6.2",
"web-vitals": "2.1.4"
......
import {UseQueryResult} from "react-query";
const SEPARATOR = ' \n\n';
export const onGeneralError = (err: any) => {
console.log(err.response);
let message = `${err.response.status} ${err.response.statusText}`;
......@@ -10,7 +12,9 @@ export const onGeneralError = (err: any) => {
document.body.innerHTML = data;
return;
}
message += '\n\n' + err.response.data;
message += SEPARATOR + err.response.data;
} else if (typeof(data) === "object") {
message += SEPARATOR + Object.values(data).join(SEPARATOR);
}
alert(message);
};
......
......@@ -18,8 +18,8 @@ class TestMqttTopicValidator(TestCase):
("Valid Non-Ascii Char", "/valid/ü", True),
("Invalid Topic (doesn't start with slash)", "test/topic", False),
("Invalid Topic (end with slash)", "/test/topic/", False),
("Invalid + Wildcard (missing slash end)", "/wild/+card", False),
("Invalid + Wildcard (missing slash start)", "wild+/card", False),
("Invalid + Wildcard (not standalone)", "/wild/+card", False),
("Invalid + Wildcard (not standalone)", "wild+/card", False),
("Invalid # Wildcard (not at end)", "/wild/#/card", False),
("Invalid null character", "/something\0", False),
],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment