Allow string values in range type on db model api.
Fix error handler for httpclient.

It was throwing error when the connection was lost before parsing status line.