Skip to content

Commit

Permalink
AWS: Properly handle requests to list the file system
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSerth authored and Dome-GER committed Oct 15, 2024
1 parent 1af6fcc commit 75c7879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/api/runners.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ func (r *RunnerController) listFileSystem(writer http.ResponseWriter, request *h
logging.StartSpan(request.Context(), "api.fs.list", "List File System", func(ctx context.Context, _ *sentry.Span) {
err = targetRunner.ListFileSystem(ctx, path, recursive, writer, privilegedExecution)
})
if errors.Is(err, runner.ErrFileNotFound) {
if errors.Is(err, runner.ErrFileNotFound) || errors.Is(err, dto.ErrNotSupported) {
// We also want to return a soft error if listing the file system is not supported (i.e., on AWS).
writeClientError(request.Context(), writer, err, http.StatusFailedDependency)
return
} else if err != nil {
Expand Down

0 comments on commit 75c7879

Please sign in to comment.