change error message from "message" to "error"
add get_device_types