Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error from 'dynamic-config-client-updater' updater: Field 'USERVER_HTTP_PROXY' is of a wrong type. Expected: stringValue, actual: objectValue #103

Closed
skene2321 opened this issue Aug 26, 2022 · 2 comments · Fixed by userver-framework/uservice-dynconf#22
Labels
bug Something isn't working

Comments

@skene2321
Copy link

Hey guys,
when connecting a dynamic-config-client-updater to a config server that's configured to use a postgresql db this error appears:

tskv timestamp=2022-08-26T17:33:41.127367 level=ERROR module=DoRun ( third_party/userver/core/src/components/run.cpp:164 ) task_id=0 thread_id=0x00007F1E59D55AC0 text=Loading failed: Error from 'dynamic-config-client-updater' updater: Field 'USERVER_HTTP_PROXY' is of a wrong type. Expected: stringValue, actual: objectValue (std::runtime_error) tskv timestamp=2022-08-26T17:33:41.129100 level=ERROR module=DaemonMain ( third_party/userver/core/src/utils/daemon_run.cpp:72 ) task_id=0 thread_id=0x00007F1E59D55AC0 text=Unhandled exception in components::Run: Error from 'dynamic-config-client-updater' updater: Field 'USERVER_HTTP_PROXY' is of a wrong type. Expected: stringValue, actual: objectValue Unhandled exception in components::Run: Error from 'dynamic-config-client-updater' updater: Field 'USERVER_HTTP_PROXY' is of a wrong type. Expected: stringValue, actual: objectValue

It's expecting a string but config_value is a json column.
The error doesn't happen if switching to the dynamic_config_fallback.json file there the value of USERVER_HTTP_PROXY is correctly a string.
Thanks

@apolukhin apolukhin added the bug Something isn't working label Aug 28, 2022
@apolukhin
Copy link
Member

Thanks for the bug report! Looks like we also need to change the tests of the service, to catch such errors early

@apolukhin
Copy link
Member

Added a test and fixed the invalid values in DB. The test is not perfect, but does the job.

Once again, many thanks for the bugreport!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants