Fix error in bus.worldTime.currentTime #261
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Way to reproduce an error
config.examples.bus
value totrue
node server.js
originated from
Example/application/domain/time/start.js
Line 9 in 2435b8e
4. Check the whole
time
value by addingconsole.debug(time);
line and restarting the server.5.
time
contains anError: Invalid result type: Field "dst_from" not of expected type: string; Field "dst_until" not of expected type: string
that is returned error but not thrown exception. That's why it cannot be catched and actually happens during processing of successful remote service answer.Resolving
Direct request to the remote service reveals that
dst_from
andday until
might has null as a value.Which wasn't expected by returning schema
Example/application/bus/worldTime/currentTime.js
Lines 19 to 21 in 2435b8e
Expected test result after fix approval