Closed AugusDogus closed 2 years ago
Hi @AugusDogus, thanks for the report. It looks like an issue with the Custom Types API endpoint, not prismic-ts-codegen
directly.
To properly diagnose the issue, I would need your Prismic repository name and a Custom Type API token. Are you comfortable sharing those with me privately?
You can send me a message on Prismic's Community Forum here: https://community.prismic.io/new-message?username=angeloashmore&title=prismic-ts-codegen%20GitHub%20Issue%2033
Thanks!
Hi @angeloashmore, thanks for reaching out!
I sent you a message via Prismic's Community Forum a couple days ago, but replying here also for documentation reasons.
I am happy to provide those, but I would prefer to do that via email if that's something you're comfortable with.
Thanks!
Hey @AugusDogus, sorry about the delay. I don't get notifications for the forum and I unfortunately missed your message. I just replied. 🙂
I'm closing this issue since it appears to be a bug in the Custom Types API rather than prismic-ts-codegen.
@AugusDogus or I will follow up in this issue once resolved for anyone who may come across this page in the future. 👍
Versions
Reproduction
Can provide privately if required.
Additional Details
[package.json ](https://gist.github.com/AugusDogus/643891f0be93122131ce2d926cb7638a) [logs.sh](https://gist.github.com/AugusDogus/329561c5958459dd91b243f934e0ddce)
Steps to reproduce
npx prismic-ts-codegen init
npx prismic-ts-codegen
What is expected?
The types file is generated.
What is actually happening?
The codegen errors out with
PrismicError: An invalid API response was returned
Not sure if this is an actual bug with
prismic-ts-codegen
or if there's an issue with thehttps://customtypes.prismic.io/customtypes/
API. I tried rolling back tov0.1.1
which I had previous success with, but it also did not work and gave the same error.I thought perhaps my
customTypesAPIToken
had been removed, but I checked my repo and it was still there. I also added a console log to myprismicCodegen.config.ts
to validate that it was being parsed throughdotenv
properly.