mtesseract / nakadi-client

Haskell Client Library for the Nakadi Event Broker
Other
13 stars 9 forks source link

Fix deserialisation of Problem type #133

Closed mtesseract closed 5 years ago

mtesseract commented 5 years ago

The test suite fails when running against the current Nakadi server version:

nakadi-client Test Suite
  EventTypes
    BusinessEvents
      createAndDeleteEvent:                                       FAIL
        Exception: DeserializationFailure "{\"title\":\"Not Found\",\"status\":404,\"detail\":\"EventType \\\"event-type-a\\\" does not exist.\"}" "Error in $: key \"type\" not present"

Apparently the field type is optional, according to RFC7807 (https://tools.ietf.org/html/rfc7807), just like e.g. status. This is bad, as it causes nakadi-client to throw DeserializationFailure exceptions on certain problems reported by the Nakadi server.

To do: Fix the implementation of the problem type according to RFC7807.

mtesseract commented 5 years ago

Fixed with #134