Base solution for your next web application
Open Closed

Avoiding Frontend Exceptions in production #10682


User avatar
0
jhess created

I am using Core 3.1 Version with Angular and I am having some trouble with the error modal which is shown when an Exception get's thrown in an application service. To avoid it, i used the second callback parameter of the subscribe method where i handle the exception. It works perfectly in the DEV environment, but when i publish it to production i always get the error modal, no matter if i provide a callback or not.

I build my angular-app with ng build --prod --base-href=/<app-name>/

I also tried using the local DEV build of the angular app with the backend production environment, and this also worked as intended - no error modal. This makes me think the error has to be somewhere in the angular project or in it's production build.

Thank you in advance!


9 Answer(s)
  • User Avatar
    1
    smry created

    What version of the accplication are you using, ASPNetZero 10.5? Or something older?

  • User Avatar
    0
    jhess created

    In this project i am using the non-zero version with .NET Core 3.1 and Angular

  • User Avatar
    0
    smry created

    can you open the package.json file in the angular solution and tell me what "version" it lists?

  • User Avatar
    0
    jhess created

    some angular libs are 9.1.4 and some others are 9.2.4

  • User Avatar
    0
    jhess created

    or do you mean the project's version like here?

  • User Avatar
    0
    smry created

    The current version is 10.5 and I think they're close to releasing v11.0 they are using angular version +12.1

    There is a chance what you're talking about was an issue but that has likely since been corrected over past 4-5 years (looks like version 4.6 was around June 2017)

    Check https://github.com/aspnetzero/aspnet-zero-core to see if there is an issue opened for that failure or upgrade to 10.5

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @jhess

    Is your app publicly accessible ?

  • User Avatar
    0
    jhess created

    No unfortunately it's just accessible inside the local network

  • User Avatar
    0
    musa.demir created

    Hi @jhess

    Can you please share the places where you made code changes? If you can share your codes, we can reproduce it.

    Also to check that issue, can you please create a sample endpoint that throws an exception. Then consume it from your angular application which you place debugger. And check what is going on.