Webhook response headers

Hey,

I've recently migrated my API containers from AWS to GCP and I'm having some issues with the webhooks from Prismic to my new GCP containers.
I'm getting this error on my webhooks in prismic: "Parse Error: Invalid header value char"

I know the headers have changed from AWS to GCP but what are the actual requirements on the headers here and why am I seeing this error.

Any hint here is appreciated .

Hello @arajet, welcome to the community!

Can you show us any errors that you see in the console?
Where and when do you see these?

1 Like

Hey @Pau,

Thank you for your reply.
I'm not sure what console you are referring? Is there some console in Prismic I am not aware of?

I see it when the Prismic webhooks makes a call to my API. I get this "Parse Error: Invalid header value char" error and it retries five times. [my repo].prismic.io/settings/webhooks/

What does that mean and how can I determine what Prismic is expecting to be in the headers.

No, there is no console of any kind in Prismic. I was referring to the platform you are using. What is the API container that you mention?

This URL doesn't seem correct: /settings/webhooks/ how are you configuring your webhooks outside of Prismic?

Hey again,

Sorry I think I was not clear in what I meant here.

I know my API is responding with a 200 - OK, I can see that in the logs and when I test the endpoint I've configured Prismic to use in Postman I can see that I receive the expected 200 response back.
But

Prismic Webhook -> My API
My API 200 response -> Prismic

But my question is what does this message mean "Parse Error: Invalid header value char" and what is Prismic expecting in the headers?

Regards

Prismic adds an auth token to the headers. Then a webhook will try to run five times and then throw that error. Usually, webhooks fail because of a misconfigured endpoint.

Hey again,

Yes I understand thank you.

But I have the exact same APIs, one running in AWS and one in GCP. The one in AWS works fine the one in GCP does not.
The responses are identical except for the headers. So my question is: Is there a way to get a more verbose error to more easily troubleshoot what in the headers Prismic does not like.

I understand. For the moment there isn't a more detailed response format for errors, I'll add a feature request for it.