FIX: Pass fileName to error handler for media optimization (PR #14058)

The file name is used to look up the promise to resolve; it was being passed for the successful path but not for the error path.

GitHub