Checking in Devices API refactoring to support using proper error
Handling