You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is minor, but could save certain users some time.
The NATS server is erroneously reporting an interface conversion error when processing configuration files and detecting errors with subject maps (in this case more than 100% allocation with weighted mapping). This is especially confusing when the server is parsing JSON configuration files, as these types of errors can be reported from invalid json.
Included nats-server -DV output
nats-server: sample.json:6:53: interface conversion: interface {} is []interface {}, not string
Versions of nats-server and affected client libraries used:
nats-server: v2.9.17-beta.1
OS/Container environment: N/A
Steps or code to reproduce the issue:
Run the server with the configuration provided above.
Expected result:
An error message indicating the total weight needs to be <= 100
Actual result:
interface conversion: interface {} is []interface {}, not string
Suggestions
I'll see if I can get a test setup later with a PR but in case someone beats me to it, the fix would appear to be replacing string with []interface{}
here:
Defect
This is minor, but could save certain users some time.
The NATS server is erroneously reporting an interface conversion error when processing configuration files and detecting errors with subject maps (in this case more than 100% allocation with weighted mapping). This is especially confusing when the server is parsing JSON configuration files, as these types of errors can be reported from invalid json.
nats-server -DV
outputVersions of
nats-server
and affected client libraries used:nats-server: v2.9.17-beta.1
OS/Container environment: N/A
Steps or code to reproduce the issue:
Run the server with the configuration provided above.
Expected result:
An error message indicating the total weight needs to be <= 100
Actual result:
interface conversion: interface {} is []interface {}, not string
Suggestions
I'll see if I can get a test setup later with a PR but in case someone beats me to it, the fix would appear to be replacing
string
with[]interface{}
here:
nats-server/server/opts.go
Line 2563 in b0d98df
{}interface
here:nats-server/server/opts.go
Line 2575 in b0d98df
The text was updated successfully, but these errors were encountered: