Better error management

using `.catchError` is a good practice to cacth errors throws during the `then` handler.
Merge pull request #21 from vicb/patch-7

Better error management