-
Notifications
You must be signed in to change notification settings - Fork 10
Closed as not planned
Labels
questionFurther information is requestedFurther information is requested
Description
Describe the bug
When call get Variants in serverSide, the response return undefined payload in type IVariant.
Steps to reproduce the bug
- call getVariant() in server side
- in time of execution the nextJs, write a error in console.
Expected behavior
When attr payload not exists in response of getVariants, the default is null.
I create a serialization to run without errors.
const serializePayload = (variant: IVariant) => {
return {
...variant,
payload: variant.payload ?? null,
};
};
Logs, error output, etc.
⨯ Error: Error serializing `.responseVariant.payload` returned from `getServerSideProps` in "/page/[[...params]]".
Reason: `undefined` cannot be serialized as JSON. Please use `null` or omit this value.
at Array.every (<anonymous>)
at Array.every (<anonymous>)
at Array.every (<anonymous>)Screenshots
Our implementation, with serialized solution:

Additional context
No response
Unleash version
1.4.4 but in new version not found.
Subscription type
None
Hosting type
None
SDK information (language and version)
@unleash/nextjs/client:1.4.4
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested
Type
Projects
Status
Done
