Trecena/trecena-core — Issue #43: save password as string error
Author: chrisswick
Created: 2012-02-09 03:17:35+00:00
State: open
Labels: Bug

I can save a password as an integer, but saving a string cases an error:

Request URL:http://sandbox.trecena.ca/api/user/profile/password
Request Method:PUT
Status Code:400 Bad Request
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Content-Type:application/json; charset=UTF-8
Origin:file://
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10
Request Payload
test
Response Headersview source
Application-Error-Code:APIEX01400
Application-Error-Message:Could not read JSON: Unrecognized token 'tet': was expecting 'null', 'true' or 'false' at [Source: org.apache.catalina.connector.CoyoteInputStream@1b3ea55; line: 1, column: 10]; nested exception is org.codehaus.jackson.JsonParseException: Unrecognized token 'tet': was expecting 'null', 'true' or 'false' at [Source: org.apache.catalina.connector.CoyoteInputStream@1b3ea55; line: 1, column: 10]
Connection:close
Content-Type:application/json;charset=ISO-8859-1
Date:Thu, 09 Feb 2012 03:15:39 GMT
Transfer-Encoding:Identity

A successful request using a number:

Request URL:http://sandbox.trecena.ca/api/user/profile/password
Request Method:PUT
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Content-Type:application/json; charset=UTF-8
Origin:file://
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10
Request Payload
456
Response Headersview source
Connection:close
Content-Type:application/json
Date:Thu, 09 Feb 2012 03:16:59 GMT
Transfer-Encoding:Identity