Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default defineConfig([
// *************** Code style and best practices ***************
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"off", // // https://github.com/eclipse-thingweb/node-wot/issues/1430
"error",
{
args: "none",
varsIgnorePattern: "Test",
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-http/src/routes/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default async function actionRoute(
let contentType: string = Array.isArray(contentTypeHeader) ? contentTypeHeader[0] : contentTypeHeader;
try {
contentType = validOrDefaultRequestContentType(req, res, contentType);
} catch (error) {
} catch {
warn(
`HttpServer received unsupported Content-Type from ${Helpers.toUriLiteral(req.socket.remoteAddress)}:${
req.socket.remotePort
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-http/src/routes/property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default async function propertyRoute(
let contentType: string = Array.isArray(contentTypeHeader) ? contentTypeHeader[0] : contentTypeHeader;
try {
contentType = validOrDefaultRequestContentType(req, res, contentType);
} catch (error) {
} catch {
warn(
`HttpServer received unsupported Content-Type from ${Helpers.toUriLiteral(req.socket.remoteAddress)}:${
req.socket.remotePort
Expand Down
2 changes: 1 addition & 1 deletion packages/binding-http/test/http-client-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class TestHttpServer implements ProtocolServer {
{ type: ContentSerdes.DEFAULT, body: Buffer.concat(body) },
this.testVector.schema ?? { type: "string" }
);
} catch (err) {
} catch {
throw new Error("Cannot deserialize client payload");
}
expect(value).to.equal(this.testVector?.payload);
Expand Down
8 changes: 4 additions & 4 deletions packages/binding-http/test/oauth-token-validation-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ describe("OAuth2.0 Validator tests", () => {
try {
await this.validator.validate(req as http.IncomingMessage, [], /.*/g);
assert(false, "method did not throw");
} catch (error) {
} catch {
assert(true);
}
}
Expand All @@ -287,7 +287,7 @@ describe("OAuth2.0 Validator tests", () => {
try {
await this.validator.validate(req as http.IncomingMessage, [], /.*/g);
assert(false, "method did not throw");
} catch (error) {
} catch {
assert(true);
}
}
Expand All @@ -309,7 +309,7 @@ describe("OAuth2.0 Validator tests", () => {
try {
await this.validator.validate(req as http.IncomingMessage, [], /.*/g);
assert(false, "method did not throw");
} catch (error) {
} catch {
assert(true);
}
}
Expand All @@ -331,7 +331,7 @@ describe("OAuth2.0 Validator tests", () => {
try {
await this.validator.validate(req as http.IncomingMessage, [], /.*/g);
assert(false, "method did not throw");
} catch (error) {
} catch {
assert(true);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default class Helpers implements Resolver {
public static async parseInteractionOutput(response: WoT.InteractionOutput): Promise<DataSchemaValue> {
try {
return await response.value();
} catch (err) {
} catch {
// TODO if response.value() fails, try low-level stream read
error("parseInteractionOutput low-level stream not implemented");
throw new Error("parseInteractionOutput low-level stream not implemented");
Expand Down