Don't return 500 Error when Blender cannot be found on $PATH

In the first-time wizard, if Blender cannot be found on $PATH but it can
be found via .blend file association, that should just be reported as a
normal sitation, and not as a `500 Internal Server Error`.
This commit is contained in:
Sybren A. Stüvel 2022-07-14 18:50:34 +02:00
parent c0f4657be4
commit 62ecd09f5f

View File

@ -184,8 +184,7 @@ func (f *Flamenco) FindBlenderExePath(e echo.Context) error {
case errors.Is(err, fs.ErrNotExist): case errors.Is(err, fs.ErrNotExist):
logger.Info().Msg("Blender could not be found as 'blender' on $PATH") logger.Info().Msg("Blender could not be found as 'blender' on $PATH")
case err != nil: case err != nil:
logger.Warn().Err(err).Msg("there was an error finding Blender as 'blender' on $PATH") logger.Info().Err(err).Msg("there was an error finding Blender as 'blender' on $PATH")
return sendAPIError(e, http.StatusInternalServerError, "there was an error finding Blender: %v", err)
default: default:
response = append(response, api.BlenderPathCheckResult{ response = append(response, api.BlenderPathCheckResult{
IsUsable: true, IsUsable: true,