Unhandled exception in Event Store on posting a projection

I am trying to programatically create projections via POSTing to Event Store. However when I post my projection using RestSharp the Event Store console log says:

Unhandled exception while processing http request at [].

It works if I use Postman to send my projection, so I guess maybe EventStore is expecting a header that isn’t included by RestSharp, or something like that.

Is there any way to get more detailed error information, to find out exactly what the exception was?


Whats the status code and body of response?

Status code: InternalServerError
Body: empty string

What is the request you sent?

POST http://localhost:2113/projections/continuous?name=myProjection&emit=yes&checkpoints=yes&enabled=yes
Authorization: Basic YWRtaW46Y2hhbmdlaXQ=
Accept: application/json, application/xml, text/json, text/x-json,
text/javascript, text/xml
User-Agent: RestSharp/
Content-Type: application\json
Host: cc.com:2113
Content-Length: 841
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive


Host isn't actually cc.com, it's just I have to post to a non-existent
external url to capture the traffic with fiddler, as requests to
localhosts are not captured.

I think Authorization: Basic YWRtaW46Y2hhbmdlaXQ= is the issue

compare it to your other working request

Both requests have that header.

What is the difference between the requests then?

also ...

Content-Type: application\json

looks like a wrong slash

What do you see when you look at the projections tab?

Thanks, that was it! I copy pasted the json header line from an
example on the internet, and that example had the wrong slash.

It might be nice if ES gave a more informative error message, but the
issue is resolved now anyway!

This should probably return an unsupported media type instead of an internal server error.