fn finish( state: EditorState, result: Result<Note, ApiError>, message: Option<&str>, failure: &str, ) -> bool