HTTP API - 500 Internal Server Error without eventId #95

Closed
MirkoBonadei opened this Issue Mar 3, 2014 · 8 comments

Projects

None yet

4 participants

@MirkoBonadei

After some testing on my PHP Proxy to EventStore I have found this behaviour.

Given this JSON with the event to send to ES:

[
  {
    eventType: "some-event-type",
    data: {
      a: 1
    }
  }
]

I perform this POST:

curl -v -d @/tmp/test.js "http://192.168.56.20:2113/streams/newstream" -H "Content-Type:application/json" -X POST
* About to connect() to 192.168.56.20 port 2113 (#0)
*   Trying 192.168.56.20... connected
> POST /streams/pippo HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 192.168.56.20:2113
> Accept: */*
> Content-Type:application/json
> Content-Length: 96
> 
* upload completely sent off: 96out of 96 bytes
< HTTP/1.1 500 Internal Server Error
< Server: Mono-HTTPAPI/1.0
< Date: Mon, 03 Mar 2014 13:41:10 GMT
< Content-Length: 0
< Connection: close
< 
* Closing connection #0
@gregoryyoung
Member

Put eventid.

You can see a sample here https://github.com/EventStore/EventStore/wiki/Writing-to-a-Stream-%28HTTP%29

Sent from my iPhone

On 03 Mar 2014, at 15:42, Mirko Bonadei notifications@github.com wrote:

After some testing on my PHP Proxy to EventStore I have found this behaviour.

Given this JSON with the event to send to ES:

[
{
eventType: "some-event-type",
data: {
a: 1
}
}
]
I perform this POST:

curl -v -d @/tmp/test.js "http://192.168.56.20:2113/streams/newstream" -H "Content-Type:application/json" -X POST

  • About to connect() to 192.168.56.20 port 2113 (#0)
  • Trying 192.168.56.20... connected

POST /streams/pippo HTTP/1.1
User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Host: 192.168.56.20:2113
Accept: /
Content-Type:application/json
Content-Length: 96

  • upload completely sent off: 96out of 96 bytes
    < HTTP/1.1 500 Internal Server Error
    < Server: Mono-HTTPAPI/1.0
    < Date: Mon, 03 Mar 2014 13:41:10 GMT
    < Content-Length: 0
    < Connection: close
    <
  • Closing connection #0

    Reply to this email directly or view it on GitHub.
@MirkoBonadei

I agree 😄 and I am doing it, so it is not a high priority but in my opinion this should not be a 500 (server fault) but a client error (400 Bad Request). Don't you agree?

@jen20
Member
jen20 commented Mar 3, 2014

Agreed, this should be a client error. We'll look into it - thanks.

@jen20 jen20 added the bug label Mar 3, 2014
@jnardiello

👍

@gregoryyoung
Member

Yes this should be a 400 I saw that when it was there was just answering
the question of how to make it go away. Will be changed.

On Mon, Mar 3, 2014 at 7:27 PM, Jacopo Nardiello
notifications@github.comwrote:

[image: 👍]

Reply to this email directly or view it on GitHubhttps://github.com/EventStore/EventStore/issues/95#issuecomment-36534596
.

Le doute n'est pas une condition agréable, mais la certitude est absurde.

@gregoryyoung
Member

Resolved:
1d02134

On Mon, Mar 3, 2014 at 7:41 PM, Greg Young gregoryyoung1@gmail.com wrote:

Yes this should be a 400 I saw that when it was there was just answering
the question of how to make it go away. Will be changed.

On Mon, Mar 3, 2014 at 7:27 PM, Jacopo Nardiello <notifications@github.com

wrote:

[image: 👍]

Reply to this email directly or view it on GitHubhttps://github.com/EventStore/EventStore/issues/95#issuecomment-36534596
.

Le doute n'est pas une condition agréable, mais la certitude est absurde.

Le doute n'est pas une condition agréable, mais la certitude est absurde.

@MirkoBonadei

👍 Well done!

@gregoryyoung
Member

resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment