js-sdk icon indicating copy to clipboard operation
js-sdk copied to clipboard

FgaRequiredParamError: Required parameter apiHost was null or undefined when calling Configuration.

Open digitaltopo opened this issue 5 months ago • 8 comments

Checklist

  • [X] I have looked into the README and have not found a suitable solution or answer.
  • [X] I have looked into the documentation and have not found a suitable solution or answer.
  • [X] I have searched the issues and have not found a suitable solution or answer.
  • [X] I have upgraded to the latest version of OpenFGA and the issue still persists.
  • [X] I have searched the Slack community and have not found a suitable solution or answer.
  • [X] I agree to the terms within the OpenFGA Code of Conduct.

Description

When apiURL parameter is not supplied while initializing the OpenFGA client, we get an error message that suggests using deprecated apiHost parameter:

FgaRequiredParamError: Required parameter apiHost was null or undefined when calling Configuration.

Expectation

The error message should be to supply an appropriate apiUrl parameter, NOT the deprecated apiHost parameter.

Reproduction

import { OpenFgaClient } from '@openfga/sdk';

const openFga = new OpenFgaClient();

OpenFGA SDK version

0.6.3

OpenFGA version

latest

SDK Configuration

javascript

Logs

No response

References

No response

digitaltopo avatar Sep 19 '24 17:09 digitaltopo