diff --git a/wp-mat.php b/wp-mat.php
index 9c7700a9df5da749628988299fd823add670522e..73df700a7b51cc606dfeedbdfb995868ae07e574 100644
--- a/wp-mat.php
+++ b/wp-mat.php
@@ -3,7 +3,7 @@
  * Plugin Name: wp-mat
  * Plugin URI: https://git.autistici.org/noblogs/wp-mat
  * Description: Process uploaded files through MAT
- * Version: 0.0.9
+ * Version: 0.0.10
  * Author: Autistici/Inventati
  * Author URI: https://www.autistici.org/
  * License: MIT
@@ -96,3 +96,8 @@ function wp_mat_handle_upload_prefilter($file) {
 }
 
 add_filter('wp_handle_upload_prefilter', 'wp_mat_handle_upload_prefilter');
+
+function wp_handle_upload_error(&$file, $message) {
+    error_log("wp_handle_upload_error: ".$message);
+    return array( "error" => $message );
+}