Strapi server restarting

System Information
  • Strapi Version: 4.3.6
  • Operating System: CentOS Stream 8
  • Database: MySQL
  • Node Version: v16.17.0
  • NPM Version: 8.15.0

Below is our simple controller function which when we invoke it causes the Strapi server to restart, the code is in src/extensions/user-permisssions/strapi-server.js

plugin.controllers.auth.register = async (ctx) => {
    return ctx.send({
      api: "called",
    });
  };

API Details
Method: POST
URL: http://www.abc.com/registerUser
Params:
{
“username”: “alex”,
“age”: “10”
}

On server restart response:

The server is restarting
Project information

┌────────────────────┬──────────────────────────────────────────────────┐
│ Time               │ Thu Dec 15 2022 11:01:08 GMT+0000 (Coordinated … │
│ Launched in        │ 1235 ms                                          │
│ Environment        │ development                                      │
│ Process PID        │ 1234567                                          │
│ Version            │ 4.3.6 (node v16.17.0)                            │
│ Edition            │ Community                                        │
└────────────────────┴──────────────────────────────────────────────────┘

Actions available

Don’t you need to return the plugin
If this is just a snippet I suggest you post the whole controller so people can see it else things can be taken out of context.

@Eventyret It’s just a simple method in controller returning a simple object which is working but post returning response Strapi server is restarting.