79180048

Date: 2024-11-12 06:52:45
Score: 2
Natty:
Report link

What is important is what structure the backend returns the error to you, what you need to do is to first understand the structure of the error and log it, and after seeing the log field, save it in a signal (or variable) and Use it. for example:

.subscribe({
  next: () => {
   //When backend is happy!
  },
  error: (error : HttpErrorResponse) => {
    console.log(error.error)
    this.errorMessage.set(error.error.message)
  }
})

Maybe this will help you too!

Reasons:
  • Contains signature (1):
  • Has code block (-0.5):
  • Starts with a question (0.5): What is
  • Low reputation (1):
Posted by: Aria