returning response as internal server error with error details if an error occurs while creating new user