$_ENV Port Number variable - config.options.port error

Wappler Version : 4.9.1
Operating System : MacOS
Server Model: NodeJS
Database Type: MSSQL
Hosting Type: Docker

Expected behavior

What do you think should happen?

When a Global $_ENV variable is created to use for the Port field in Database Connections, the value set under Project Environment tab is expected as a number type.

Actual behavior

What actually happens?

The value used for the Port $_ENV variable is not of type number and it generates an error 500.

How to reproduce

  1. Create a Global $_ENV.DB_PORT
  2. Set a value for under Project Environment tab
  3. Set Port value to $_ENV.DB_PORT under Database Connections via dynamic picker
  4. Run an API using this database connection - it gives an error 500 with the message The config.options.port property must be of type number.
  5. Remove the $_ENV variable under DB Connections and manually type the Port number - the connection works correctly

Are you sure the same happens in version 5?

Hi Teodor, I haven’t migrated the project to version 5 yet. I’m sorry, I don’t know whether this issue is coming up in v5 also.