NubeIO / iot-engine

IoT Engine
5 stars 1 forks source link

Enhance response error message when executing dynamic api #267

Open zero88 opened 5 years ago

zero88 commented 5 years ago

Brief Currently, when executing dynamic API with unavailable API, system shows error too general and more technical.

{
    "code": "SERVICE_ERROR",
    "message": "Service Unavailable | Cause: Not found eventbus-message-service - Error Code: NOT_FOUND"
}

Need to enhance it to:

{
    "code": "SERVICE_ERROR",
    "message": "Service Unavailable | Cause: API path <actual-path> is unavailable or not found"
}

DOD

https://github.com/NubeIO/iot-engine/blob/e10aebbf80e0a29d384728cbca058fa24550d25e/core/micro/src/main/java/com/nubeiot/core/micro/ServiceDiscoveryController.java#L138-L139