Open Bjvanminnen opened 6 years ago
@joshlory can you chime in with your thoughts on priority of this? I don't have enough context to understand the implications
Agree we should fix this. I don't know if it meets the bar for Launch Day — hopefully the interpreted code defends against the user writing any code that could throw, but a bit concerning that we're getting exceptions from playSound
in interpreted code.
@Bjvanminnen can you share the repro where the validation API was failing?
I dont have an active repro. I'd hit this before https://github.com/code-dot-org/code-dot-org/pull/25516/files, I think because we'd made a change to dance that was still waiting on the corresponding change to the CDO repo.
i don't know what priority this should be, but marking as csedweek bug given the conversation above.
We recently ran into an issue where our api validation was failing
https://github.com/code-dot-org/code-dot-org/blob/staging/apps/src/lib/util/audioApi.js#L42
You would expect to see the appropriate error logged to the console. Instead, we were seeing an exception.
This is because we were ultimately calling
outputWarning
here https://github.com/code-dot-org/code-dot-org/blob/staging/apps/src/lib/util/javascriptMode.js#L25 anderrorHandler
is undefined.I suspect we want to call
injectErrorHandler
in dance, similar to how we do in GameLab, i.e. https://github.com/code-dot-org/code-dot-org/blob/staging/apps/src/gamelab/GameLab.js#L204