Two bugs fixed:
1. Missing await for GetClientID() in leaveSessionRest
- jamClient.GetClientID() returns a Promise
- Was passed unresolved to deleteParticipant(), causing
DELETE /api/participants/[object Promise] 404 error
- Now properly awaited before use
2. Unsafe property access on error object
- error.controlled_location accessed without null check
- Changed to error?.controlled_location (optional chaining)
- Prevents "Cannot read properties of undefined" error
These issues manifested when using MacBook Pro built-in mic/speakers
instead of Scarlet audio interface, likely due to different
initialization timing or missing audio profile causing error paths.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>