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 [http://127.0.0.1:2113/].

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?

Thanks,

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
HTTP/1.1
Authorization: Basic YWRtaW46Y2hhbmdlaXQ=
Accept: application/json, application/xml, text/json, text/x-json,
text/javascript, text/xml
User-Agent: RestSharp/105.0.1.0
Content-Type: application\json
Host: cc.com:2113
Content-Length: 841
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive

fromStream("myStream").
    when({
    })

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.