mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-18 22:18:23 +00:00
Don't fail if missing IP (#9253)
This commit is contained in:
parent
9a4e3a7a46
commit
4fbab2d8b0
@ -79,10 +79,8 @@ def get_fn(blueprint: Blueprint) -> Callable:
|
|||||||
if host_ip:
|
if host_ip:
|
||||||
return ApiResponse.success({"ip": host_ip})
|
return ApiResponse.success({"ip": host_ip})
|
||||||
|
|
||||||
return ApiResponse.error(
|
# If we cannot fetch the IP, still return a 200 but without informing the IP.
|
||||||
status=ApiResponse.STATUS_SERVER_ERROR,
|
return ApiResponse.success({"ip": "unknown"})
|
||||||
error=f"Could not extract the host IP from neither {IP_SERVICES}. Verify connectivity.",
|
|
||||||
)
|
|
||||||
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
msg = f"Internal error obtaining host IP due to [{exc}] "
|
msg = f"Internal error obtaining host IP due to [{exc}] "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user