Fork me on GitHub
#reitit
<
2019-01-14
>
PB18:01:32

Hi all. I seem to be finding an odd error while trying to use spec to validate values passed to my endpoints

[:response nil]
[:last-method "PATCH"]
[:last-error "Bad Request [400]"]
[:failure :error]
[:status-text "Bad Request"]
[:parse-error 
{:status 400, :failure :parse, :response nil, :status-text 
"Unexpected token : i … ld have been Transit"
Unexpected token : in JSON at position 1  Format should have been Transit
, :original-text 
"[:spec "(spec-tools. … quest :body-params]]"
[:spec "(spec-tools.core/spec {:spec (clojure.spec.alpha/keys :opt-un [:infusion.routes.services/display-name]), :type :map, :spec-tools.parse/key->spec {:display-name :infusion.routes.services/display-name}, :spec-tools.parse/keys #{:display-name}, :spec-tools.parse/keys-opt #{:display-name}})"][:problems []][:type :reitit.coercion/request-coercion][:coercion :spec][:value nil][:in [:request :body-params]]
}
]
[:status 400]
[:uri 
"/groups/5c38d547-6a5 … 4a-b7bd-394dab989ff0"
]
[:debug-message "Http response at 400 or 500 level"]
[:last-error-code 6]
It seems to be having issues with transmit?