Errors and Troubleshooting
The errors that the SDK reports and how to fix them.
Error behavior
The SDK never throws from render(). It hides the panel and fires the error event. Your page keeps working.
cgElement.on('error', ({ code, message }) => {
console.warn(code, message);
// Continue checkout without the offer.
});Error codes
presentation_empty
The response has no presentation field, or it is empty.
Send the complete Create Offer response. Check that your offer has a presentation. If it has none, visit Your Program in our Partner Portal and request a change for your Offer Presentation.
presentation_malformed
The presentation field has an invalid shape.
Contact Cover Genius with the response ID.
schema_version_unsupported
The SDK does not know the schema_version.
Update the SDK to the latest version.
not_registered
render() ran before the SDK registered.
Call registerElements() first.
Common problems
Debug mode
Turn on debug mode to write SDK logs to the console.
Each render() logs a line with the placement key, the number of products, and whether the response changed from the last one.
Turn debug mode off in production.
Contact support
Send these details to Cover Genius:
The SDK version.
The offer response
id.The
presentation.refvalue.The browser and version.
The
erroreventcodeandmessage.
Do not send customer personal data.
Last updated
Was this helpful?

