mostlyserious / craft-promptly

Revolutionize content creation in Craft by leveraging the power of AI, giving superpowers to your content creators to help them brainstorm and edit content with an AI assistant directly within Craft CMS.
Other
0 stars 1 forks source link

Docs #2

Closed benrnorman closed 10 months ago

benrnorman commented 1 year ago

Hi guys,

App looks good, one issue we ran into though. We setup our OpenAI account and followed the docs, got the API key and org id via the link in the settings page, but whenever we ran a query the app just hung. In the console there was an error message: "Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'shift') at promptly.iife.js?v=1690784210:11:395"

Issue turned out to be we forgot to add a billing method to our OpenAI account and the API is only available to paid users. The API endoint probably just returns null if the account isn't a paid account, causing the Javascript issue.

Seems obvious but we missed it, so thought might be worth adding to the readme.

corneliusio commented 1 year ago

@benrnorman Thanks for calling this out! The plugin should definitely be handling and reporting this error to the user on the front end. Will dig into this ASAP.

corneliusio commented 10 months ago

Sorry for the delay on getting to this, but these errors are now being handled correctly in the latest version, v1.2.2.