Skip to content

FCE-2044 sdk clients should fail fast when misconfigured#259

Open
czerwiukk wants to merge 1 commit into
mainfrom
FCE-2044/sdk-clients-should-fail-fast
Open

FCE-2044 sdk clients should fail fast when misconfigured#259
czerwiukk wants to merge 1 commit into
mainfrom
FCE-2044/sdk-clients-should-fail-fast

Conversation

@czerwiukk
Copy link
Copy Markdown
Member

Description

Adjusts the docs to the new sdk changes.

@czerwiukk czerwiukk self-assigned this May 22, 2026
@linear
Copy link
Copy Markdown

linear Bot commented May 22, 2026

FCE-2044

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the backend server setup documentation to reflect new SDK client initialization behavior that verifies credentials early (“fail fast”) rather than deferring failures until the first room operation.

Changes:

  • Adds examples of “create + verify” client initialization for TypeScript and Python.
  • Updates the synchronous-construction path to use the plain constructor plus an explicit credential check call.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

First of all, view your app in the [**Fishjam developer panel**](https://fishjam.io/app) and copy your **Fishjam ID** and the **Management Token**.
They are required to proceed. Now, we are ready to dive into the code.

The verifying factory constructs the client and pings the Fishjam backend with the supplied credentials, so a bad `fishjamId` or `managementToken` fails at startup instead of on the first room operation.
Comment on lines +99 to +100
If you need synchronous construction (for example inside a framework plugin that is not async), use the plain constructor and verify separately. The constructor only checks that the fields are non-empty; it does not contact the backend.

czerwiukk added a commit to fishjam-cloud/js-server-sdk that referenced this pull request Jun 2, 2026
## Description

Adds credentials validation to the preferred way of creating the client.
There is also a separate checkCredentials method if someone needs to
create the client synchronously.

## Motivation and Context

The SDK client should fail fast when misconfigured.

## Documentation impact

- [ ] Documentation update required
- [x] Documentation updated [in another
PR](fishjam-cloud/documentation#259)
- [ ] No documentation update required

## Types of changes

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to
      not work as expected)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants