Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchElement error: The filter query requires a value #211

Open
LarsOlt opened this issue Aug 13, 2024 · 1 comment
Open

fetchElement error: The filter query requires a value #211

LarsOlt opened this issue Aug 13, 2024 · 1 comment
Labels
question Further information is requested

Comments

@LarsOlt
Copy link

LarsOlt commented Aug 13, 2024

await fsxaApi .fetchElement({
    id: reference.referenceId,
    locale: tabSection.previewId.split('.')[1], // e.g. 8e805568-5301-43df-868b-7e952f40ba8a.de_DE
})

We are using this code to resolve a page reference, which works fine.
The console is showing the following error from the fsxa-api package though:

"Error: The filter query requires a value"

How can we fix this? There is no filter option on the function.

image
@nico-mcalley nico-mcalley added the question Further information is requested label Aug 15, 2024
@nico-mcalley
Copy link
Collaborator

Hey Lars,
I was not able to reproduce your described behaviour.
Internally the fetchElement method calls a fetchByFilter with following filter:

{
field: 'identifier',
operator: ComparisonQueryOperatorEnum.EQUALS,
value: id,
}

As you can see here, this error is only thrown, when there is a problem with the provided id.

Could you provide a minimal reproduction to the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants