get device inline with rest of error handling