Updated js api handlers and styles for error message