Open Closed

Cannot read properties of undefined (reading 'details') at getErrorFromRequestBody (abp-ng.theme.shared) #8844


User avatar
0
dfzamora created
  • ABP Framework version: v8.2.3

  • UI Type: Angular V17

  • Database System: EF Core (SQL Server)

  • Tiered (for MVC) or Auth Server Separated (for Angular): no

  • Exception message and full stack trace:ERROR TypeError: Cannot read properties of undefined (reading 'details')
    at getErrorFromRequestBody (abp-ng.theme.shared.mjs:2477:14)
    at AbpFormatErrorHandlerService.execute (abp-ng.theme.shared.mjs:2516:36)
    at ErrorHandler.handleError (abp-ng.theme.shared.mjs:2774:37)
    at Object.next (abp-ng.theme.shared.mjs:2763:36)
    at ConsumerObserver.next (Subscriber.js:91:33)
    at SafeSubscriber._next (Subscriber.js:60:26)
    at SafeSubscriber.next (Subscriber.js:31:18)
    at subscribe.innerSubscriber (switchMap.js:14:144)
    at OperatorSubscriber._next (OperatorSubscriber.js:13:21)
    at OperatorSubscriber.next (Subscriber.js:31:18)

  • Steps to reproduce the issue:
    I have created a service in the backend, and the goal is to call this service from the frontend,
    when there is a missing parameter in the request, there is an exception being thrown, which is correct, the issue is that the default error message is not being displayed when this happens,
    I tested throwing an UserFriendlyException, and with this kind of exception the error is displayed, in the case of a bad request because of the request structure, the modal is not displayed

image.png
image.png

According to the console message, this is the code that is failing inside abp-ng.theme.shared.mjs file
image.png

Do you have any idea about what is happening?


2 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi,

    We'll try to reproduce the problem soon and aur Angular team will help you soon.
    We may ask you for more information.
    Thanks for your patience

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello, thank you for providing the detailed information regarding your issue, and apologies for the delayed response.

    It seems that the response is true for showing the error. However, I could not produce the same problem on my end since the request body might differ. That would be the best if you could provide a sample for the endpoint you have added to your project.

    Meanwhile, you can also check this documentation to handle the http errors in a customized way https://abp.io/docs/latest/framework/ui/angular/http-error-handling#how-to-add-new-handler-service

    Please feel free to reach out if you need additional assistance. Thank you again for your cooperation.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08