Error handling for user.js client