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
An app crashes when a 'list' (array) property doesn't receive the correct input:
"tags": {
"type": ["string"]
}
REST Request (pseudo code): POST { "tags": "one" } (should have been array not string)
Error: could not create List from JSON string: at new List (<...>/node_modules/loopback-datasource-juggler/lib/list.js:16:13)
This should be handled gracefully by any means, not bail out completely! (perhaps even cast a scalar to an single-item array). A more extensible approach would be custom formatters/converters/coercing - see #128
The text was updated successfully, but these errors were encountered:
An app crashes when a 'list' (array) property doesn't receive the correct input:
REST Request (pseudo code):
POST { "tags": "one" }
(should have been array not string)Error: could not create List from JSON string: at new List (<...>/node_modules/loopback-datasource-juggler/lib/list.js:16:13)
This should be handled gracefully by any means, not bail out completely! (perhaps even cast a scalar to an single-item array). A more extensible approach would be custom formatters/converters/coercing - see #128
The text was updated successfully, but these errors were encountered: