When we're performing an import to an existing store, first perform a lookup of the store so that we can:
Error if this store does not exist
OpenFGA will not error if provided a store ID on model write that doesn't exist (https://github.com/openfga/openfga/issues/690), so we can force this into an error by attempting to lookup the store first and bubbling up the error
Retrieve the store metadata to allow us to output the store/model information
Also refactors the code a little to remove some of the unnecessary nolint directives
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[x] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected
Description
When we're performing an import to an existing store, first perform a lookup of the store so that we can:
Also refactors the code a little to remove some of the unnecessary
nolint
directivesReferences
Closes #334
Review Checklist
main