fixed error endpoint