0
내 백엔드에서에 해당 작업 내에서 두 가지 가능한 응답이 있습니다.NativeScript - NotFound()에 패치가있는 백엔드에서 응답을받지 못함
첫 번째 :
return Ok(new { Message = "email_confirmed" });
을 그리고 두 번째 :
let url: string = "http://10.0.2.2:53286/api/Home/AccountValidation?codeActivation=" + this.code;
this.http.patch(url, {
}).subscribe((res) => {
console.log(JSON.stringify(res));
if(res.status != 404) {
alert({title: "Sistema 3 Esferas", message: "¡Tu cuenta ha sido activada satisfactoriamente! :)", okButtonText: "¡Entendido!"});
this.router.navigate(["/Miembro"]);
} else {
this.btnEnabled = true;
alert({title: "Sistema 3 Esferas", message: "Has introducido un código inválido. :(", okButtonText: "Entiendo..."});
}
});
다시 경우 :
return NotFound();
그리고이있어 내 프런트 엔드에
-end은에 도달합니다.이면if
이 실행되고 모든 것이 완벽하게 작동합니다. 그러나 내
백엔드이 두 번째 리턴 인
NotFound()
에 도달하면 아무 일도 발생하지 않습니다.
subscribe()
의 시작 부분에이
log
이 표시되어 있습니까?
NotFound()
이 반환되는 경우
console.log(JSON.stringify(res));
음은 아무 것도 로그에 보여되지 않습니다. 구독이 실행되지 않은 경우와 거의 같습니다.
왜 그런 일이 발생합니까?