Fixed the error handling
Merge branch 'develop' of https://github.com/projectcs13/sensor-cloud into develop