Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Returned 404 on unauthorized request? #3823


User avatar
0
fguo created

I used AbpAuthorize notation to add an AppPermissions on a service. When I tried it with Swagger or Postman, it returns "404 Not Found" error, instead of "403 Forbidden". Did I miss something?

I prefer to get 403 error while the user's request is not permitted. Is that possible or easy to set?

Thanks, p.s. I am using Core + Angular version 4.4.0


2 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    can you share the codes?

  • User Avatar
    0
    fguo created

    It is not the issue on my code only. You may try built-in APIs (e.g. /api/services/app/DemoUiComponents/GetCountries) on swagger UI or Postman. You may always see Response Code of 404.

    In this scenario, it should throw out a 403 code, because I don't pass the authentication, I think.