From 9051bc26480c123c5c76042ef8e522fe463bd679 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 23 Oct 2024 11:55:21 +0300 Subject: [PATCH] logfix --- src/handlers/proxy.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/handlers/proxy.rs b/src/handlers/proxy.rs index 2bfad2b..8ae21da 100644 --- a/src/handlers/proxy.rs +++ b/src/handlers/proxy.rs @@ -1,5 +1,5 @@ use actix_web::{error::ErrorInternalServerError, web, HttpRequest, HttpResponse, Result}; -use log::warn; +use log::{error, warn}; use crate::app_state::AppState; use crate::handlers::serve_file::serve_file; @@ -37,7 +37,10 @@ pub async fn proxy_handler( "aac" => "audio/aac", "m4a" => "audio/m4a", "flac" => "audio/flac", - _ => return Err(ErrorInternalServerError("unsupported file format")), + _ => { + error!("unsupported file format"); + return Err(ErrorInternalServerError("unsupported file format")); + }, }; warn!("content_type: {}", content_type);