Warning About role when using custom controller method

System Information
  • Strapi Version:
  • Operating System:
  • Database:
  • Node Version:
  • NPM Version:
  • Yarn Version:

I created a custom controller method for one of my content-types, but when I call it as an authenticated user I get ‘warn The value of field: ‘role’, in your where filter, is undefined.’

I am creating a query filter to be used in the query but have not specified any role information.
Thanks for any suggestions.

As a side note, calling users/me also generates the same warning.

Did you ever get any resolution to this?

Yes, I am no longer getting these warnings. Appears to be resolved. Thanks.

Oh, I was hoping you found a solution. I’m currently experiencing this issue and haven’t found a solution.

As of latest v4 release, “4.3.4”.

Oh, I’m still running v3. Did you migrate from 3-4?

I did migrate.

I’m also trying that now and haven’t had a whole lot of luck. I used codemods for the code, but I got stuck with the database migration using the script. Did you have any issues during your migration.