Cumulocity-IoT / cumulocity-dynamic-mapper

The ultimate Mapper for building the bridge between any Message Broker and Cumulocity IoT in a zero-code approach!
Apache License 2.0
10 stars 9 forks source link

can't delete a connector #253

Closed ck-c8y closed 1 month ago

ck-c8y commented 1 month ago

When you try to delete a connector, HTTP 500 is returned:

2024-09-09 11:49:48.488 INFO 12 --- [p-nio-80-exec-1] d.mapping.rest.MappingRestController : Tenant XYZ - Delete connection instance lyocx9 2024-09-09 11:49:48.556 INFO 12 --- [p-nio-80-exec-1] d.m.c.core.registry.ConnectorRegistry : Tenant XYZ - No Client is registered for connector ident lyocx9

ck-c8y commented 1 month ago

Currently only enabled connectors are in the connector registry, hence we run into:

AConnectorClient client = connectorRegistry.getClientForTenant(tenant, configuration.getIdent());
if (client == null)
  return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("Client with ident" + ident + " not found");
ck-c8y commented 1 month ago

This is fixed ind 63817a2cc42481ed221a74d5691ce6cc0ccbad17