Commit 4dd100a0 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Handle 400 returned by lft script if file is too large

parent f9986484
......@@ -383,6 +383,11 @@ void FileTransferChatMessageModifier::processResponseFromPostFile (const belle_h
releaseHttpRequest();
fileUploadEndBackgroundTask();
}
} else if (code == 400) {
lWarning() << "Received HTTP code response " << code << " for file transfer, probably meaning file is too large";
chatMessage->updateState(ChatMessage::State::FileTransferError);
releaseHttpRequest();
fileUploadEndBackgroundTask();
} else {
lWarning() << "Unhandled HTTP code response " << code << " for file transfer";
chatMessage->updateState(ChatMessage::State::NotDelivered);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment