Skip to content

fix: unleash.Initialize() method does not return error if client creation fails - #206

Merged
FredrikOseberg merged 1 commit into
Unleash:v5from
ydessoukyy:initialize-method-err-return-fix
Sep 26, 2025
Merged

fix: unleash.Initialize() method does not return error if client creation fails #206
FredrikOseberg merged 1 commit into
Unleash:v5from
ydessoukyy:initialize-method-err-return-fix

Conversation

@ydessoukyy

@ydessoukyy ydessoukyy commented Sep 7, 2025

Copy link
Copy Markdown
Contributor

This PR updates the Initialize function to properly return errors from NewClient.
Previously, Initialize would just return immediately, leaving it unclear whether the client was successfully initialized or if there was a connection/configuration issue.

With this change, callers of Initialize can now handle initialization errors gracefully.

Important files

unleash.go (updated Initialize function)

closes #205
Discussion points

Should we also consider adding a health check (pinging the Unleash server) during initialization, or is propagating the error enough for now?

@FredrikOseberg
FredrikOseberg merged commit 40bd141 into Unleash:v5 Sep 26, 2025
15 of 26 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in Issues and PRs Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

unleash.Initialize() method does not return error if client creation fails

3 participants