Added API and custom error page