-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Background
At present, calling sdk.New()
with a platform endpoint that does not resolve to a connected platform resolves to a potentially misleading error: ErrPlatformConfigFailed
(see logic).
This is misleading because it could mask legitimate platform errors:
- config not being served but platform running
- config served at wrong location but platform running
- logic to get config is bad, but platform running
It would be better to test connection to a running platform during a remote connection (non-IPC) SDK instantiation within the sdk.New
logic, and to return a more specific error ErrPlatformEndpointNotFound
when the provided platformEndpoint does not resolve to a running platform.
This will clarify platform running states to PEPs, who are currently expected to write their own logic to detect ErrPlatformConfigFailed
as the key error for an invalid or disconnected platform endpoint to provide the user with helpful information about checking the platform endpoint value or platform state (see otdfctl).
Acceptance Criteria
- A small check is added before fetching the platform configuration within sdk.New to ensure the platform is actually reachable
- If it is not reachable, a more helpful named error is provided to scope the issue to the platform likely not running at the provided endpoint