Added catching of exceptions
REST WIP