error message when impossible to infer the primary-key; fix #517

This commit is contained in:
qdequele 2020-03-11 12:27:42 +01:00
parent c25641ff2d
commit 4ccf1d10bd
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
3 changed files with 39 additions and 1 deletions

View file

@ -145,7 +145,7 @@ async fn update_multiple_documents(mut ctx: Request<Data>, is_partial: bool) ->
Some(id) => id,
None => match data.first().and_then(|docs| find_primary_key(docs)) {
Some(id) => id,
None => return Err(ResponseError::bad_request("Could not infer a schema")),
None => return Err(ResponseError::bad_request("Could not infer a primary key")),
},
};