some changes to catch 404 and 412 exceptions.
some changes to catch 404 and 412 exceptions.

jimpeak/GSoC-Communicating-with-mobile-devices,MarcosPividori/GSoC-Communicating-with-mobile-devices,MarcosPividori/GSoC-Communicating-with-mobile-devices,jimpeak/GSoC-Communicating-with-mobile-devices,jimpeak/GSoC-Communicating-with-mobile-devices,marvelm/GSoC-Communicating-with-mobile-devices,marvelm/GSoC-Communicating-with-mobile-devices,marvelm/GSoC-Communicating-with-mobile-devices,MarcosPividori/GSoC-Communicating-with-mobile-devices