Unhelpful HTTP api response from rails -


i have ios app , passing image couple strings rails api. have started getting error rails. couldn't find info on causing error. assuming has passing larger average data package (an image) .

{ status code: 500, headers {     connection = close;     date = "fri, 15 jul 2016 20:30:01 gmt";     server = "nginx/1.4.6 (ubuntu)";     "transfer-encoding" = identity; } 

should trying solve problem client (ios) or server (rails/nginx) perspective?

potentially helpful info:

the rails controller api starts

def image_build     begin       puts "begin" 

but "begin" never printed.

edit 1

some more info:

in ios these lines have output below:

print(response) print(response.description) print(response.data) print(response.request) print(response.response) 

output:

success:  success:  optional(<>) optional(<nsmutableurlrequest: 0x7fa9539506a0> { url: http://www.example.com/api/image_build }) optional(<nshttpurlresponse: 0x7fa9515c9cd0> { url: http://www.example.com/api/image_build } { status code: 500, headers {     connection = close;     date = "fri, 15 jul 2016 20:30:01 gmt";     server = "nginx/1.4.6 (ubuntu)";     "transfer-encoding" = identity; } }) 

edit 2

i believe timing out in sense. when remove rails image upload , have ios send image on still doesnt work. if tell ios not send image, strings pass on successfully. fails when ios tries send image.

i not sure "puts" response, ideally should use log statements logger.debug or logger.info , check log. depending on rails env in, if in production log/production.log or log/development.log in development env. give more answers why getting 500 error.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -