Fixed wrong response of backup/restore endpoints when error occurring.