Fix a bug parsing error responses.

Bug was introduced by a change to make json parser more robust. The change was to make parsing of BoxTypedObject fall back to base type if "type" field doesn't exist or is unknown. However caused a json parsing exception swallowed and produced a class cast exception