Skip to content

Commit

Permalink
feat(ffi): Warning instead of error if dc_get_msg() could not retriev…
Browse files Browse the repository at this point in the history
…e message

As trashed messages can't be loaded from the db now by `Message::load_from_db()` returning an error
for such messages, errors from `Message::load_from_db()` should be logged as warnings. If it's
really an error like a db failure, it should be logged internally.
  • Loading branch information
iequidoo committed Apr 15, 2024
1 parent f25b020 commit c2ace28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deltachat-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ pub unsafe extern "C" fn dc_get_msg(context: *mut dc_context_t, msg_id: u32) ->
);
message::Message::default()
} else {
error!(ctx, "dc_get_msg could not retrieve msg_id {msg_id}: {e:#}");
warn!(ctx, "dc_get_msg could not retrieve msg_id {msg_id}: {e:#}");
return ptr::null_mut();
}
}
Expand Down

0 comments on commit c2ace28

Please sign in to comment.