diff --git a/addressbook/e-book-backend-couchdb.c b/addressbook/e-book-backend-couchdb.c
index 49c292e..dd76d94 100644
--- a/addressbook/e-book-backend-couchdb.c
+++ b/addressbook/e-book-backend-couchdb.c
@@ -28,6 +28,10 @@
 #include <dbus/dbus-glib.h>
 #include <gnome-keyring.h>
 
+#define EDB_ERROR(_code) e_data_book_create_error (E_DATA_BOOK_STATUS_ ## _code, NULL)
+#define EDB_ERROR_EX(_code, _msg) e_data_book_create_error (E_DATA_BOOK_STATUS_ ## _code, _msg)
+#define EDB_ERROR_FMT(_code, _fmt, _msg) e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_ ## _code, _fmt, _msg)
+
 #define COUCHDB_REVISION_PROP                "X-COUCHDB-REVISION"
 #define COUCHDB_UUID_PROP                    "X-COUCHDB-UUID"
 #define COUCHDB_APPLICATION_ANNOTATIONS_PROP "X-COUCHDB-APPLICATION-ANNOTATIONS"
@@ -950,18 +954,19 @@ document_deleted_cb (CouchdbDatabase *database, const char *docid, gpointer user
 	e_book_backend_cache_remove_contact (couchdb_backend->cache, docid);
 }
 
-static GNOME_Evolution_Addressbook_CallStatus
+static void
 e_book_backend_couchdb_load_source (EBookBackend *backend,
 				    ESource *source,
-				    gboolean only_if_exists)
+				    gboolean only_if_exists,
+				    GError **error)
 {
 	gchar *uri;
 	const gchar *property;
-	GError *error = NULL;
+	GError *err = NULL;
 	GSList *doc_list, *sl;
 	EBookBackendCouchDB *couchdb_backend = E_BOOK_BACKEND_COUCHDB (backend);
 
-	g_return_val_if_fail (E_IS_BOOK_BACKEND_COUCHDB (couchdb_backend), GNOME_Evolution_Addressbook_OtherError);
+	e_return_data_book_error_if_fail (E_IS_BOOK_BACKEND_COUCHDB (couchdb_backend), E_DATA_BOOK_STATUS_INVALID_ARG);
 
 	if (couchdb_backend->couchdb != NULL)
 		g_object_unref (G_OBJECT (couchdb_backend->couchdb));
@@ -976,8 +981,8 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 	property = e_source_get_property (source, "couchdb_instance");
 	if (g_strcmp0 (property, "user") == 0) {
 		if (! (couchdb_backend->couchdb = COUCHDB_SESSION (desktopcouch_session_new ()))) {
-			g_warning ("Could not create DesktopcouchSession object");
-			return GNOME_Evolution_Addressbook_NoSuchBook;
+			g_propagate_error (error, EDB_ERROR_EX (NO_SUCH_BOOK, "Could not create DesktopcouchSession object"));
+			return;
 		}
 
 		couchdb_backend->using_desktopcouch = TRUE;
@@ -988,41 +993,55 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 			uri = g_strdup ("http://127.0.0.1:5984");
 
 		if (! (couchdb_backend->couchdb = couchdb_session_new (uri))) {
+			g_propagate_error (error, EDB_ERROR_FMT (NO_SUCH_BOOK, "Cannot create session with URI '%s'", uri));
 			g_free (uri);
-			return GNOME_Evolution_Addressbook_NoSuchBook;
+			return;
 		}
 
 		g_free (uri);
 	}
 
 	/* check if only_if_exists */
-	error = NULL;
+	err = NULL;
 	couchdb_backend->database = couchdb_session_get_database (couchdb_backend->couchdb,
 								  "contacts",
-								  &error);
+								  &err);
 	if (couchdb_backend->database == NULL) {
-		if (error) {
-			g_warning ("Could not get CouchDB database info: %s", error->message);
-			g_error_free (error);
+		if (err) {
+			g_propagate_error (error, EDB_ERROR_FMT (NO_SUCH_BOOK, "Could not get CouchDB database info: %s", err->message));
+			g_error_free (err);
 		}
 
-		if (only_if_exists)
-			return GNOME_Evolution_Addressbook_NoSuchBook;
-		
+		if (only_if_exists) {
+			if (error && !*error)
+				g_propagate_error (error, EDB_ERROR_EX (NO_SUCH_BOOK, "Cannot get CouchDB database info"));
+			return;
+		}
+
+		g_clear_error (error);
+
 		/* if it does not exist, create it */
-		error = NULL;
+		err = NULL;
 		if (!couchdb_session_create_database (couchdb_backend->couchdb,
 						      "contacts",
-						      &error)) {
-			g_warning ("Could not create 'contacts' database: %s", error->message);
-			g_error_free (error);
+						      &err)) {
+			g_propagate_error (error, EDB_ERROR_FMT (PERMISSION_DENIED, "Could not create 'contacts' database: %s", err->message));
+			g_error_free (err);
 
-			return GNOME_Evolution_Addressbook_PermissionDenied;
+			return;
 		}
 
+		err = NULL;
 		couchdb_backend->database = couchdb_session_get_database (couchdb_backend->couchdb,
 									  "contacts",
-									  &error);
+									  &err);
+
+		if (err) {
+			g_propagate_error (error, EDB_ERROR_FMT (OTHER_ERROR, "Cannot get CouchDB database: %s", err->message));
+			g_error_free (err);
+
+			return;
+		}
 	}
 
 	/* Create cache */
@@ -1032,9 +1051,9 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 
 	/* Populate the cache */
 	e_file_cache_clean (E_FILE_CACHE (couchdb_backend->cache));
-	error = NULL;
+	err = NULL;
 	doc_list = couchdb_database_get_all_documents (couchdb_backend->database,
-						       &error);
+						       &err);
 	for (sl = doc_list; sl != NULL; sl = sl->next) {
 		EContact *contact;
 		CouchdbDocument *document = COUCHDB_DOCUMENT (sl->data);
@@ -1059,8 +1078,6 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 
 	e_book_backend_set_is_loaded (backend, TRUE);
 	e_book_backend_set_is_writable (backend, TRUE);
-
-	return GNOME_Evolution_Addressbook_Success;
 }
 
 static void
@@ -1076,7 +1093,7 @@ e_book_backend_couchdb_remove (EBookBackend *backend, EDataBook *book, guint32 o
 
 	/* We don't remove data from CouchDB, since it would affect other apps,
 	   so just report success */
-	e_data_book_respond_remove (book, opid, GNOME_Evolution_Addressbook_Success);
+	e_data_book_respond_remove (book, opid, NULL /* Success */);
 }
 
 static char *
@@ -1086,7 +1103,7 @@ e_book_backend_couchdb_get_static_capabilities (EBookBackend *backend)
 }
 
 static EContact *
-put_document (EBookBackendCouchDB *couchdb_backend, CouchdbDocument *document)
+put_document (EBookBackendCouchDB *couchdb_backend, CouchdbDocument *document, GError **perror)
 {
 	GError *error = NULL;
 
@@ -1102,8 +1119,10 @@ put_document (EBookBackendCouchDB *couchdb_backend, CouchdbDocument *document)
 		return new_contact;
 	} else {
 		if (error != NULL) {
-			g_warning ("Could not PUT document: %s\n", error->message);
+			g_propagate_error (perror, EDB_ERROR_FMT (OTHER_ERROR, "Could not PUT document: %s", error->message));
 			g_error_free (error);
+		} else {
+			g_propagate_error (perror, EDB_ERROR_EX (OTHER_ERROR, "Could not PUT document"));
 		}
 	}
 
@@ -1119,26 +1138,30 @@ e_book_backend_couchdb_create_contact (EBookBackend *backend,
 	EContact *contact, *new_contact;
 	CouchdbDocument *document;
 	EBookBackendCouchDB *couchdb_backend = E_BOOK_BACKEND_COUCHDB (backend);
+	GError *err = NULL;
 
 	contact = e_contact_new_from_vcard (vcard);
 	if (!contact) {
-		e_data_book_respond_create (book, opid, GNOME_Evolution_Addressbook_OtherError, NULL);
+		e_data_book_respond_create (book, opid, EDB_ERROR_EX (OTHER_ERROR, "Invalid vCard"), NULL);
 		return;
 	}
 
 	document = couch_document_from_contact (couchdb_backend, contact);
 	if (!document) {
-		e_data_book_respond_create (book, opid, GNOME_Evolution_Addressbook_OtherError, NULL);
+		e_data_book_respond_create (book, opid, EDB_ERROR_EX (OTHER_ERROR, "Cannot create CouchDB document from a contact"), NULL);
 		g_object_unref (G_OBJECT (contact));
 		return;
 	}
 
 	/* save the contact into the DB */
-	if ((new_contact = put_document (couchdb_backend, document)) != NULL) {
-		e_data_book_respond_create (book, opid, GNOME_Evolution_Addressbook_Success, new_contact);
+	if ((new_contact = put_document (couchdb_backend, document, &err)) != NULL) {
+		e_data_book_respond_create (book, opid, NULL /* Success */, new_contact);
 		g_object_unref (new_contact);
-	} else
-		e_data_book_respond_create (book, opid, GNOME_Evolution_Addressbook_OtherError, NULL);
+	} else {
+		if (!err)
+			err = EDB_ERROR_EX (OTHER_ERROR, "Could not PUT document");
+		e_data_book_respond_create (book, opid, err, NULL);
+	}
 
 	/* free memory */
 	g_object_unref (G_OBJECT (contact));
@@ -1153,6 +1176,7 @@ e_book_backend_couchdb_remove_contacts (EBookBackend *backend,
 {
 	GList *l, *deleted_ids = NULL;
 	EBookBackendCouchDB *couchdb_backend = E_BOOK_BACKEND_COUCHDB (backend);
+	GError *err = NULL;
 
 	for (l = id_list; l != NULL; l = l->next) {
 		CouchdbDocument *document;
@@ -1189,10 +1213,10 @@ e_book_backend_couchdb_remove_contacts (EBookBackend *backend,
 					e_book_backend_cache_remove_contact (couchdb_backend->cache, uid);
 				} else {
 					if (error != NULL) {
-						g_debug ("Error deleting document: %s", error->message);
+						err = EDB_ERROR_FMT (OTHER_ERROR, "Error deleting document: %s", error->message);
 						g_error_free (error);
 					} else
-						g_debug ("Error deleting document");
+						err = EDB_ERROR_EX (OTHER_ERROR, "Error deleting document");
 				}
 
 				/* Free memory */
@@ -1205,28 +1229,29 @@ e_book_backend_couchdb_remove_contacts (EBookBackend *backend,
 					e_book_backend_cache_remove_contact (couchdb_backend->cache, uid);
 				} else {
 					if (error != NULL) {
-						g_debug ("Error deleting document: %s", error->message);
+						err = EDB_ERROR_FMT (OTHER_ERROR, "Error deleting document: %s", error->message);
 						g_error_free (error);
 					} else
-						g_debug ("Error deleting document");
+						err = EDB_ERROR_EX (OTHER_ERROR, "Error deleting document");
 				}
 			}
 		} else {
 			if (error != NULL) {
-				g_debug ("Error getting document: %s", error->message);
+				err = EDB_ERROR_FMT (OTHER_ERROR, "Error getting document: %s", error->message);
 				g_error_free (error);
 			} else
-				g_debug ("Error getting document");
+				err = EDB_ERROR_EX (OTHER_ERROR, "Error getting document");
 		}
 	}
 
 	if (deleted_ids) {
-		e_data_book_respond_remove_contacts (book, opid,
-						     GNOME_Evolution_Addressbook_Success, deleted_ids);
+		e_data_book_respond_remove_contacts (book, opid, NULL /* Success */, deleted_ids);
 		g_list_free (deleted_ids);
+
+		if (err)
+			g_error_free (err);
 	} else
-		e_data_book_respond_remove_contacts (book, opid,
-						     GNOME_Evolution_Addressbook_OtherError, NULL);
+		e_data_book_respond_remove_contacts (book, opid, err, NULL);
 }
 
 static void
@@ -1238,26 +1263,30 @@ e_book_backend_couchdb_modify_contact (EBookBackend *backend,
 	EContact *contact, *new_contact;
 	CouchdbDocument *document;
 	EBookBackendCouchDB *couchdb_backend = E_BOOK_BACKEND_COUCHDB (backend);
+	GError *err = NULL;
 
 	contact = e_contact_new_from_vcard (vcard);
 	if (!contact) {
-		e_data_book_respond_modify (book, opid, GNOME_Evolution_Addressbook_OtherError, NULL);
+		e_data_book_respond_modify (book, opid, EDB_ERROR_EX (OTHER_ERROR, "Invalid vCard"), NULL);
 		return;
 	}
 
 	document = couch_document_from_contact (couchdb_backend, contact);
 	if (!document) {
-		e_data_book_respond_modify (book, opid, GNOME_Evolution_Addressbook_OtherError, NULL);
+		e_data_book_respond_modify (book, opid, EDB_ERROR_EX (OTHER_ERROR, "Cannot create CouchDB document from a contact"), NULL);
 		g_object_unref (G_OBJECT (document));
 		return;
 	}
 
 	/* save the contact into the DB */
-	if ((new_contact = put_document (couchdb_backend, document)) != NULL) {
-		e_data_book_respond_modify (book, opid, GNOME_Evolution_Addressbook_Success, new_contact);
+	if ((new_contact = put_document (couchdb_backend, document, &err)) != NULL) {
+		e_data_book_respond_modify (book, opid, NULL /* Success */, new_contact);
 		g_object_unref (new_contact);
-	} else
-		e_data_book_respond_modify (book, opid, GNOME_Evolution_Addressbook_OtherError, NULL);
+	} else {
+		if (!err)
+			err = EDB_ERROR_EX (OTHER_ERROR, "Could not PUT document");
+		e_data_book_respond_modify (book, opid, err, NULL);
+	}
 
 	/* free memory */
 	g_object_unref (G_OBJECT (contact));
@@ -1281,14 +1310,14 @@ e_book_backend_couchdb_get_contact (EBookBackend *backend,
 		if (vcard != NULL) {
 			e_data_book_respond_get_contact (book,
 							 opid,
-							 GNOME_Evolution_Addressbook_Success,
+							 NULL /* Success */,
 							 vcard);
 			g_free (vcard);
 			return;
 		}
 	}
 
-	e_data_book_respond_get_contact (book, opid, GNOME_Evolution_Addressbook_ContactNotFound, "");
+	e_data_book_respond_get_contact (book, opid, EDB_ERROR (CONTACT_NOT_FOUND), "");
 }
 
 static void
@@ -1313,7 +1342,7 @@ e_book_backend_couchdb_get_contact_list (EBookBackend *backend,
 		g_object_unref (G_OBJECT (contact));
 	}
 
-	e_data_book_respond_get_contact_list (book, opid, GNOME_Evolution_Addressbook_Success, contacts);
+	e_data_book_respond_get_contact_list (book, opid, NULL /* Success */, contacts);
 }
 
 static void
@@ -1342,7 +1371,7 @@ e_book_backend_couchdb_start_book_view (EBookBackend *backend,
 		g_object_unref (G_OBJECT (contact));
 	}
 
-	e_data_book_view_notify_complete (book_view, GNOME_Evolution_Addressbook_Success);
+	e_data_book_view_notify_complete (book_view, NULL /* Success */);
 }
 
 static void
@@ -1381,8 +1410,7 @@ e_book_backend_couchdb_get_required_fields (EBookBackend *backend,
 	field_name = e_contact_field_name (E_CONTACT_GIVEN_NAME);
 	fields = g_list_append (fields, g_strdup (field_name));
 
-	e_data_book_respond_get_required_fields(book, opid,
-						GNOME_Evolution_Addressbook_Success, fields);
+	e_data_book_respond_get_required_fields (book, opid, NULL /* Success */, fields);
 
 	g_list_foreach (fields, (GFunc) g_free, NULL);
 	g_list_free (fields);
@@ -1459,8 +1487,7 @@ e_book_backend_couchdb_get_supported_fields (EBookBackend *backend,
 	fields = g_list_append (fields, g_strdup (e_contact_field_name (E_CONTACT_IM_SKYPE)));
 	fields = g_list_append (fields, g_strdup (e_contact_field_name (E_CONTACT_IM_YAHOO)));
 
-	e_data_book_respond_get_supported_fields (book, opid,
-						  GNOME_Evolution_Addressbook_Success, fields);
+	e_data_book_respond_get_supported_fields (book, opid, NULL /* Success */, fields);
 
 	g_list_foreach (fields, (GFunc) g_free, NULL);
 	g_list_free (fields);
@@ -1473,21 +1500,20 @@ e_book_backend_couchdb_get_supported_auth_methods (EBookBackend *backend, EDataB
 
 	auth_methods = g_list_append (auth_methods, g_strdup ("plain/password"));
 
-	e_data_book_respond_get_supported_auth_methods (book, opid,
-							GNOME_Evolution_Addressbook_Success, auth_methods);
+	e_data_book_respond_get_supported_auth_methods (book, opid, NULL /* Success */, auth_methods);
 
 	g_list_foreach (auth_methods, (GFunc) g_free, NULL);
 	g_list_free (auth_methods);
 }
 
-static GNOME_Evolution_Addressbook_CallStatus
-e_book_backend_couchdb_cancel_operation (EBookBackend *backend, EDataBook *book)
+static void
+e_book_backend_couchdb_cancel_operation (EBookBackend *backend, EDataBook *book, GError **perror)
 {
-	return GNOME_Evolution_Addressbook_CouldNotCancel;
+	g_propagate_error (perror, EDB_ERROR (COULD_NOT_CANCEL));
 }
 
 static void
-e_book_backend_couchdb_set_mode (EBookBackend *backend, GNOME_Evolution_Addressbook_BookMode mode)
+e_book_backend_couchdb_set_mode (EBookBackend *backend, EDataBookMode mode)
 {
 }
 
diff --git a/calendar/e-cal-backend-couchdb.c b/calendar/e-cal-backend-couchdb.c
index f3497d5..8bd447f 100644
--- a/calendar/e-cal-backend-couchdb.c
+++ b/calendar/e-cal-backend-couchdb.c
@@ -27,6 +27,10 @@
 #include <dbus/dbus-glib.h>
 #include <gnome-keyring.h>
 
+#define EDC_ERROR(_code) e_data_cal_create_error (_code, NULL)
+#define EDC_ERROR_EX(_code, _msg) e_data_cal_create_error (_code, _msg)
+#define EDC_ERROR_FMT(_code, _fmt, _msg) e_data_cal_create_error_fmt (_code, _fmt, _msg)
+
 #define COUCHDB_REVISION_PROP                "X-COUCHDB-REVISION"
 #define COUCHDB_UUID_PROP                    "X-COUCHDB-UUID"
 #define COUCHDB_APPLICATION_ANNOTATIONS_PROP "X-COUCHDB-APPLICATION-ANNOTATIONS"
@@ -156,7 +160,7 @@ document_deleted_cb (CouchdbSession *couchdb, const char *dbname, const char *do
 }
 
 static ECalComponent *
-put_document (ECalBackendCouchDB *couchdb_backend, CouchdbDocument *document)
+put_document (ECalBackendCouchDB *couchdb_backend, CouchdbDocument *document, GError **perror)
 {
 	GError *error = NULL;
 
@@ -173,8 +177,10 @@ put_document (ECalBackendCouchDB *couchdb_backend, CouchdbDocument *document)
 
 	} else {
 		if (error != NULL) {
-			g_warning ("Could not PUT document: %s\n", error->message);
+			g_propagate_error (perror, e_data_cal_create_error_fmt (OtherError, "Could not PUT document: %s\n", error->message));
 			g_error_free (error);
+		} else {
+			g_propagate_error (perror, EDC_ERROR_EX (OtherError, "Could not PUT document"));
 		}
 	}
 
@@ -189,7 +195,7 @@ void
 e_cal_backend_couchdb_is_read_only (ECalBackend *backend, EDataCal *cal)
 {
 	g_warning ("In _is_read_only");
-	e_data_cal_notify_read_only (cal, GNOME_Evolution_Calendar_Success, FALSE);
+	e_data_cal_notify_read_only (cal, NULL /* Success */, FALSE);
 }
 
 /* Returns the email address of the person who opened the calendar */
@@ -200,7 +206,7 @@ e_cal_backend_couchdb_get_cal_address (ECalBackend *backend, EDataCal *cal)
 	/* FIXME */
 	const gchar *address;
 	address = NULL;
-	e_data_cal_notify_cal_address (cal, GNOME_Evolution_Calendar_Success, address);
+	e_data_cal_notify_cal_address (cal, NULL /* Success */, address);
 }
 
 /* Email based alarms */
@@ -211,7 +217,7 @@ e_cal_backend_couchdb_get_alarm_email_address (ECalBackend *backend, EDataCal *c
 	/* FIXME */
 	const gchar *address;
 	address = NULL;
-	e_data_cal_notify_alarm_email_address (cal, GNOME_Evolution_Calendar_Success, address);
+	e_data_cal_notify_alarm_email_address (cal, NULL /* Success */, address);
 }
 
 void 
@@ -221,7 +227,7 @@ e_cal_backend_couchdb_get_ldap_attribute (ECalBackend *backend, EDataCal *cal)
 	/* FIXME */
 	const gchar *attribute;
 	attribute = NULL;
-	e_data_cal_notify_ldap_attribute (cal, GNOME_Evolution_Calendar_Success, attribute);
+	e_data_cal_notify_ldap_attribute (cal, NULL /* Success */, attribute);
 }
 
 void 
@@ -233,7 +239,7 @@ e_cal_backend_couchdb_get_static_capabilities (ECalBackend *backend, EDataCal *c
 
 	capabilities = g_strdup ("local,do-initial-query,bulk-removes");
 
-	e_data_cal_notify_static_capabilities(cal, GNOME_Evolution_Calendar_Success, capabilities);
+	e_data_cal_notify_static_capabilities(cal, NULL /* Success */, capabilities);
 }
 
 void 
@@ -252,7 +258,8 @@ e_cal_backend_couchdb_open (ECalBackend *backend, EDataCal *cal, gboolean only_i
 
 	source = e_cal_backend_get_source (backend);
 	if (!(E_IS_CAL_BACKEND_COUCHDB (couchdb_backend))) {
-		e_data_cal_notify_open (cal, GNOME_Evolution_Calendar_OtherError);
+		e_data_cal_notify_open (cal, EDC_ERROR (InvalidArg));
+		return;
 	}
 
 	if (couchdb_backend->couchdb != NULL)
@@ -269,8 +276,7 @@ e_cal_backend_couchdb_open (ECalBackend *backend, EDataCal *cal, gboolean only_i
 	property = e_source_get_property (source, "couchdb_instance");
 	if (g_strcmp0 (property, "user") == 0) {
 		if (! (couchdb_backend->couchdb = COUCHDB_SESSION (desktopcouch_session_new ()))) {
-			g_warning ("Could not create DesktopcouchSession object");
-			e_data_cal_notify_open (cal, GNOME_Evolution_Calendar_NoSuchCal);
+			e_data_cal_notify_open (cal, EDC_ERROR_EX (NoSuchCal, "Could not create DesktopcouchSession object"));
 		}
 
 		couchdb_backend->using_desktopcouch = TRUE;
@@ -282,7 +288,7 @@ e_cal_backend_couchdb_open (ECalBackend *backend, EDataCal *cal, gboolean only_i
 
 		if (! (couchdb_backend->couchdb = couchdb_session_new (uri))) {
 			g_free (uri);
-			e_data_cal_notify_open (cal, GNOME_Evolution_Calendar_NoSuchCal);
+			e_data_cal_notify_open (cal, EDC_ERROR (NoSuchCal));
 		}
 
 		g_free (uri);
@@ -299,18 +305,20 @@ e_cal_backend_couchdb_open (ECalBackend *backend, EDataCal *cal, gboolean only_i
 			g_error_free (error);
 		}
 
-		if (only_if_exists)
-			e_data_cal_notify_open (cal, GNOME_Evolution_Calendar_NoSuchCal);
+		if (only_if_exists) {
+			e_data_cal_notify_open (cal, EDC_ERROR (NoSuchCal));
+			return;
+		}
 		
 		/* if it does not exist, create it */
 		error = NULL;
 		if (!couchdb_session_create_database (couchdb_backend->couchdb,
 						      couchdb_backend->dbname,
 						      &error)) {
-			g_warning ("Could not create 'tasks' database: %s", error->message);
+			GError *err = e_data_cal_create_error_fmt (PermissionDenied, "Could not create '%s' database: %s", couchdb_backend->dbname, error->message);
 			g_error_free (error);
 
-			e_data_cal_notify_open (cal, GNOME_Evolution_Calendar_PermissionDenied);
+			e_data_cal_notify_open (cal, err);
 		}
 	} else
 		couchdb_database_info_unref (db_info);
@@ -372,7 +380,7 @@ e_cal_backend_couchdb_open (ECalBackend *backend, EDataCal *cal, gboolean only_i
 	//e_cal_backend_set_is_loaded (backend, TRUE);
 	//e_cal_backend_set_is_writable (backend, TRUE);
 	
-	e_data_cal_notify_open (cal, GNOME_Evolution_Calendar_Success);
+	e_data_cal_notify_open (cal, NULL /* Success */);
 	
 }
 
@@ -393,7 +401,7 @@ e_cal_backend_couchdb_remove (ECalBackend *backend, EDataCal *cal)
 
 	/* We don't remove data from CouchDB, since it would affect other apps,
 	   so just report success */
-	e_data_cal_notify_remove (cal, GNOME_Evolution_Calendar_Success);
+	e_data_cal_notify_remove (cal, NULL /* Success */);
 }
 
 /* Object related virtual methods */
@@ -406,6 +414,7 @@ e_cal_backend_couchdb_create_object (ECalBackend *backend, EDataCal *cal, const
 	CouchdbDocument *document;
 	ECalBackendCouchDB *couchdb_backend = E_CAL_BACKEND_COUCHDB (backend);
 	const gchar *uid;
+	GError *err = NULL;
 
 	task = e_cal_component_new_from_string (calobj);
 	e_cal_component_get_uid (task, &uid);
@@ -413,24 +422,24 @@ e_cal_backend_couchdb_create_object (ECalBackend *backend, EDataCal *cal, const
 	// g_warning("UID:%s", uid);
  
 	if (!task) {
-		e_data_cal_notify_object_created (cal, GNOME_Evolution_Calendar_OtherError, uid, NULL);
+		e_data_cal_notify_object_created (cal, EDC_ERROR (InvalidObject), uid, NULL);
 		return;
 	}
 
 	document = couch_document_from_task (couchdb_backend, task);
 	if (!document) {
-		e_data_cal_notify_object_created (cal, GNOME_Evolution_Calendar_OtherError, uid, NULL);
+		e_data_cal_notify_object_created (cal, EDC_ERROR_EX (OtherError, "Cannot create CouchDB document from ECalComponent"), uid, NULL);
 		g_object_unref (G_OBJECT (task));
 		return;
 	}
 
 	/* save the task into the DB */
-	if ((new_task = put_document (couchdb_backend, document)) != NULL) {
+	if ((new_task = put_document (couchdb_backend, document, &err)) != NULL) {
 		g_warning ("In _open: saving the task into the DB");
-		e_data_cal_notify_object_created (cal, GNOME_Evolution_Calendar_Success, uid, calobj);
+		e_data_cal_notify_object_created (cal, NULL /* Success */, uid, calobj);
 		g_object_unref (new_task);
 	} else
-		e_data_cal_notify_object_created (cal, GNOME_Evolution_Calendar_OtherError, uid, NULL);
+		e_data_cal_notify_object_created (cal, err, uid, NULL);
 
 	/* free memory */
 	g_object_unref (G_OBJECT (task));
@@ -444,32 +453,32 @@ e_cal_backend_couchdb_modify_object (ECalBackend *backend, EDataCal *cal, const
 	ECalComponent *task, *new_task;
 	CouchdbDocument *document;
 	ECalBackendCouchDB *couchdb_backend = E_CAL_BACKEND_COUCHDB (backend);
+	GError *err = NULL;
 
 	task = e_cal_component_new_from_string (calobj);
 	if (!task) {
-		e_data_cal_notify_object_modified (cal, GNOME_Evolution_Calendar_OtherError, NULL, NULL);
+		e_data_cal_notify_object_modified (cal, EDC_ERROR (InvalidObject), NULL, NULL);
 		return;
 	}
 
 	document = couch_document_from_task (couchdb_backend, task);
 	if (!document) {
-		e_data_cal_notify_object_modified (cal, GNOME_Evolution_Calendar_OtherError, NULL, NULL);
+		e_data_cal_notify_object_modified (cal, EDC_ERROR_EX (OtherError, "Cannot create CouchDB document from ECalComponent"), NULL, NULL);
 		g_object_unref (G_OBJECT (document));
 		return;
 	}
 
 	/* save the task into the DB */
-	if ((new_task = put_document (couchdb_backend, document)) != NULL) {
+	if ((new_task = put_document (couchdb_backend, document, &err)) != NULL) {
 		e_cal_component_commit_sequence (new_task);
-		e_data_cal_notify_object_modified (cal, GNOME_Evolution_Calendar_Success, calobj,  e_cal_component_get_as_string (new_task));
+		e_data_cal_notify_object_modified (cal, NULL /* Success */, calobj,  e_cal_component_get_as_string (new_task));
 		g_object_unref (new_task);
 	} else
-		e_data_cal_notify_object_modified (cal, GNOME_Evolution_Calendar_OtherError, NULL, NULL);
+		e_data_cal_notify_object_modified (cal, err, NULL, NULL);
 
 	/* free memory */
 	g_object_unref (G_OBJECT (task));
 	g_object_unref (G_OBJECT (document));
-	e_data_cal_notify_object_modified (cal, GNOME_Evolution_Calendar_OtherError, NULL, NULL);
 }
 
 void 
@@ -479,7 +488,7 @@ e_cal_backend_couchdb_remove_object (ECalBackend *backend, EDataCal *cal, const
 
 	ECalBackendCouchDB *couchdb_backend = E_CAL_BACKEND_COUCHDB (backend);
 	CouchdbDocument *document;
-	GError *error = NULL;
+	GError *error = NULL, *err = NULL;
 	ECalComponentId id;
 	gboolean deleted;
 
@@ -516,10 +525,10 @@ e_cal_backend_couchdb_remove_object (ECalBackend *backend, EDataCal *cal, const
 				e_cal_backend_cache_remove_component (couchdb_backend->cache, uid, rid);
 			} else {
 				if (error != NULL) {
-					g_warning ("Error deleting document: %s", error->message);
+					err = EDC_ERROR_FMT (OtherError, "Error deleting document: %s", error->message);
 					g_error_free (error);
 				} else
-					g_warning ("Error deleting document");
+					err = EDC_ERROR_EX (OtherError, "Error deleting document");
 			}
 
 			/* Free memory */
@@ -533,26 +542,26 @@ e_cal_backend_couchdb_remove_object (ECalBackend *backend, EDataCal *cal, const
 				e_cal_backend_cache_remove_component (couchdb_backend->cache, uid, rid);
 			} else {
 				if (error != NULL) {
-					g_warning ("Error deleting document: %s", error->message);
+					err = EDC_ERROR_FMT (OtherError, "Error deleting document: %s", error->message);
 					g_error_free (error);
 				} else
-					g_warning ("Error deleting document");
+					err = EDC_ERROR_EX (OtherError, "Error deleting document");
 			}
 		}
 	} else {
 		if (error != NULL) {
-			g_warning ("Error getting document: %s", error->message);
+			err = EDC_ERROR_FMT (OtherError, "Error getting document: %s", error->message);
 			g_error_free (error);
 		} else
-			g_warning ("Error getting document");
+			err = EDC_ERROR_EX (OtherError, "Error getting document");
 	}
 
 	if (deleted) {
 		g_warning ("In _remove_object: object removed successfully");
-		e_data_cal_notify_object_removed (cal, GNOME_Evolution_Calendar_Success, &id, NULL, NULL);
+		e_data_cal_notify_object_removed (cal, NULL /* Success */, &id, NULL, NULL);
 	} else {
 		g_warning ("In _remove_object: object not removed successfully");
-		e_data_cal_notify_object_removed (cal, GNOME_Evolution_Calendar_OtherError, &id, NULL, NULL);
+		e_data_cal_notify_object_removed (cal, err, &id, NULL, NULL);
 	}
 }
 
@@ -561,21 +570,21 @@ void
 e_cal_backend_couchdb_discard_alarm (ECalBackend *backend, EDataCal *cal, const gchar *uid, const gchar *auid)
 {
 	g_warning ("In _discard_alarm");
-	e_data_cal_notify_alarm_discarded (cal, GNOME_Evolution_Calendar_Success);
+	e_data_cal_notify_alarm_discarded (cal, NULL /* Success */);
 }
 
 void 
 e_cal_backend_couchdb_receive_objects (ECalBackend *backend, EDataCal *cal, const gchar *calobj)
 {
 	g_warning ("In _receive_objects");
-	e_data_cal_notify_objects_received (cal, GNOME_Evolution_Calendar_OtherError);
+	e_data_cal_notify_objects_received (cal, EDC_ERROR (NotSupported));
 }
 
 void 
 e_cal_backend_couchdb_send_objects (ECalBackend *backend, EDataCal *cal, const gchar *calobj)
 {
 	g_warning ("In _send_objects");
-	e_data_cal_notify_objects_sent (cal, GNOME_Evolution_Calendar_OtherError, NULL, NULL);
+	e_data_cal_notify_objects_sent (cal, EDC_ERROR (NotSupported), NULL, NULL);
 }
 
 void 
@@ -594,9 +603,8 @@ e_cal_backend_couchdb_get_default_object (ECalBackend *backend, EDataCal *cal)
 	if (task)
 		g_object_unref (task);
 
-	e_data_cal_notify_default_object (cal, GNOME_Evolution_Calendar_Success, object);*/
-	e_data_cal_notify_default_object (cal, GNOME_Evolution_Calendar_OtherError, NULL);
-	//e_data_cal_notify_default_object (cal, GNOME_Evolution_Calendar_Success, NULL);
+	e_data_cal_notify_default_object (cal, NULL / * Success * /, object);*/
+	e_data_cal_notify_default_object (cal, EDC_ERROR (NotSupported), NULL);
 }
 
 void 
@@ -614,13 +622,13 @@ e_cal_backend_couchdb_get_object (ECalBackend *backend, EDataCal *cal, const gch
 
 		g_object_unref (G_OBJECT (task));
 		if (task_string != NULL) {
-			e_data_cal_notify_object (cal, GNOME_Evolution_Calendar_Success, task_string);
+			e_data_cal_notify_object (cal, NULL /* Success */, task_string);
 			g_free (task_string);
 			return;
 		}
 	}
 
-	e_data_cal_notify_object (cal, GNOME_Evolution_Calendar_ObjectNotFound, "");
+	e_data_cal_notify_object (cal, EDC_ERROR (ObjectNotFound), "");
 }
 
 void 
@@ -647,14 +655,14 @@ e_cal_backend_couchdb_get_object_list (ECalBackend *backend, EDataCal *cal, cons
 		g_object_unref (G_OBJECT (task));
 	}
 
-	e_data_cal_notify_object_list (cal, GNOME_Evolution_Calendar_Success, tasks);
+	e_data_cal_notify_object_list (cal, NULL /* Success */, tasks);
 }
 
 void 
 e_cal_backend_couchdb_get_attachment_list (ECalBackend *backend, EDataCal *cal, const gchar *uid, const gchar *rid)
 {
 	g_warning ("In _get_attachment_list");
-	e_data_cal_notify_attachment_list (cal, GNOME_Evolution_Calendar_OtherError, NULL);
+	e_data_cal_notify_attachment_list (cal, EDC_ERROR (NotSupported), NULL);
 }
 
 /* Timezone related virtual methods */
@@ -662,14 +670,14 @@ void
 e_cal_backend_couchdb_get_timezone (ECalBackend *backend, EDataCal *cal, const gchar *tzid)
 {
 	g_warning ("In _get_timezone");
-	e_data_cal_notify_timezone_requested (cal, GNOME_Evolution_Calendar_OtherError, NULL);
+	e_data_cal_notify_timezone_requested (cal, EDC_ERROR (NotSupported), NULL);
 }
 
 void 
 e_cal_backend_couchdb_add_timezone (ECalBackend *backend, EDataCal *cal, const gchar *object)
 {
 	g_warning ("In _add_timezone");
-	e_data_cal_notify_timezone_added (cal, GNOME_Evolution_Calendar_OtherError, NULL);
+	e_data_cal_notify_timezone_added (cal, EDC_ERROR (NotSupported), NULL);
 }
 
 void 
@@ -682,14 +690,20 @@ e_cal_backend_couchdb_set_default_zone (ECalBackend *backend, EDataCal *cal, con
 
 	couchdb_backend = (ECalBackendCouchDB *) backend;
 
-	if (!(E_IS_CAL_BACKEND_COUCHDB(couchdb_backend)))
-		e_data_cal_notify_default_timezone_set (cal, GNOME_Evolution_Calendar_OtherError);
-	if (!(tzobj != NULL))
-		e_data_cal_notify_default_timezone_set (cal, GNOME_Evolution_Calendar_OtherError);
+	if (!(E_IS_CAL_BACKEND_COUCHDB(couchdb_backend))) {
+		e_data_cal_notify_default_timezone_set (cal, EDC_ERROR (InvalidArg));
+		return;
+	}
+	if (!(tzobj != NULL)) {
+		e_data_cal_notify_default_timezone_set (cal, EDC_ERROR (InvalidArg));
+		return;
+	}
 
 	tz_comp = icalparser_parse_string (tzobj);
-	if (!tz_comp)
-		e_data_cal_notify_default_timezone_set (cal, GNOME_Evolution_Calendar_InvalidObject);
+	if (!tz_comp) {
+		e_data_cal_notify_default_timezone_set (cal, EDC_ERROR (InvalidObject));
+		return;
+	}
 
 	zone = icaltimezone_new ();
 	icaltimezone_set_component (zone, tz_comp);
@@ -698,7 +712,7 @@ e_cal_backend_couchdb_set_default_zone (ECalBackend *backend, EDataCal *cal, con
 		icaltimezone_free (couchdb_backend->default_zone, 1);
 
 	couchdb_backend->default_zone = zone;
-	e_data_cal_notify_default_timezone_set (cal, GNOME_Evolution_Calendar_Success);
+	e_data_cal_notify_default_timezone_set (cal, NULL /* Success */);
 }
 
 /*void 
@@ -746,9 +760,9 @@ e_cal_backend_couchdb_start_query (ECalBackend *backend, EDataCalView *query)
 	}
 
 
-	e_data_cal_view_notify_done (query, GNOME_Evolution_Calendar_Success);
+	e_data_cal_view_notify_done (query, NULL /* Success */);
 
-	//e_data_cal_notify_query (cal, GNOME_Evolution_Calendar_Success, query);
+	//e_data_cal_notify_query (cal, NULL / * Success * /, query);
 }
 
 /* Mode relate virtual methods */
@@ -756,7 +770,7 @@ CalMode
 e_cal_backend_couchdb_get_mode (ECalBackend *backend)
 {
 	g_warning ("In _get_mode");
-	//e_data_cal_notify_mode (NULL, GNOME_Evolution_Calendar_OtherError, GNOME_Evolution_Calendar_CalListener_MODE_NOT_SET);
+	//e_data_cal_notify_mode (NULL, EDC_ERROR (OtherError), ModeNotSet);
 	return CAL_MODE_LOCAL;
 }
 
@@ -764,22 +778,22 @@ void
 e_cal_backend_couchdb_set_mode (ECalBackend *backend, CalMode mode)
 {
 	g_warning ("In _set_mode");
-	//e_data_cal_notify_mode (NULL, GNOME_Evolution_Calendar_OtherError, GNOME_Evolution_Calendar_CalListener_MODE_NOT_SET);
-	e_cal_backend_notify_mode (backend, GNOME_Evolution_Calendar_CalListener_MODE_SET, GNOME_Evolution_Calendar_MODE_REMOTE);
+	//e_data_cal_notify_mode (NULL, EDC_ERROR (OtherError), ModeNotSet);
+	e_cal_backend_notify_mode (backend, ModeSet, Remote);
 }
 
 void 
 e_cal_backend_couchdb_get_free_busy (ECalBackend *backend, EDataCal *cal, GList *users, time_t start, time_t end)
 {
 	g_warning ("In _get_free_busy");
-	e_data_cal_notify_free_busy (cal, GNOME_Evolution_Calendar_OtherError, NULL);
+	e_data_cal_notify_free_busy (cal, EDC_ERROR (NotSupported), NULL);
 }
 
 void 
 e_cal_backend_couchdb_get_changes (ECalBackend *backend, EDataCal *cal, const gchar *change_id)
 {
 	g_warning ("In _get_changes");
-	e_data_cal_notify_changes (cal, GNOME_Evolution_Calendar_OtherError, NULL, NULL, NULL);
+	e_data_cal_notify_changes (cal, EDC_ERROR (NotSupported), NULL, NULL, NULL);
 }
 
 static void
