handling errors with userMessage from api