Aurelia auth - custom response message - console error
问题 Using this aurelia-auth plugin together with .NET Core webAPI, I wish to return a custom error when user tries to log in with incorrect username and/or password. WebAPI: public HttpResponseMessage Login() { if (passwordValid) { return Request.CreateResponse(new LoginResponseViewModel { Token = token }); } else { return Request.CreateResponse(HttpStatusCode.Unauthorized, "Incorrect username or password!"); } } Script logIn(email, password) { return this.auth.login(email, password) .then