In functions/mailbox_display.php showMessagesForMailbox() function has user friendly notices for failed SORT/THREAD commands. These notices are never reached, because sqimap_get_sort_order() and get_thread_sort() commands handle IMAP errors internally. Third argument is hardcoded to true in used sqimap_run_command() and sqimap_run_command_list() calls.
Test server: GNU mailutils imap4d 1.1.