Each course has different policies on whether progress is saved progressively. Depending on the error message your course progress may or may not have been saved. If you log into the course and are not asked to resume your progress, then unfortunately your progress has not been saved and the course will need to be started again.