The following error appears once I read a config file using ballerina/config. The error is not descriptive enough to correct the issue.
Asked
Active
Viewed 825 times
1 Answers
1
You need to add double quotes for the string type config values.
eg: ballerina code
string x = config:getAsString("XVAL");
conf file content
XVAL="1S"

Manuri Perera
- 534
- 6
- 16
-
It's really great if it is possible to improve the error details. For aforementioned scenario error should be as follows Error - Config file read error FileName [FileName] Line[Line No] – nimantha lakmal Sep 22 '18 at 04:11
-
You can report a git issue at https://github.com/ballerina-platform/ballerina-lang/issues for this. – Manuri Perera Sep 22 '18 at 13:51
-
"extraneous input" error will show even when we haven't defined RHS values in ballerina.conf. – Pasan W. Sep 26 '18 at 10:06