jambonz / jambonz/jambonz-api-server

Service crashes when webapp requests a recording that doesn't exist

Open
#212 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
24
Forks
38
Avg merge
8h 34m
Merged PRs (30d)
1

Description

In the webapp, if we open a recent call and that call doesn't have a recording in the bucket (due to a api-server update, the old calls don't have a recording yet), the api-server crashes with the following log (and a few seconds later I'm logged out of the webapp):

``` js
ApiError: No such object: my-bucket-recordings/2023/08/01/abcd5559-aaaa-1111-a12e-9a0f48fce600.mp3
at new ApiError (/opt/app/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:80:15)
at Util.parseHttpRespMessage (/opt/app/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:182:41)
at Util.handleResp (/opt/app/node_modules/@google-cloud/storage/build/src/nodejs-common/util.js:156:76)
at Duplexify. (/opt/app/node_modules/@google-cloud/storage/build/src/file.js:1072:38)
at Duplexify.emit (node:events:513:28)
at PassThrough.emit (node:events:513:28)
at onResponse (/opt/app/node_modules/retry-request/index.js:234:19)
at PassThrough. (/opt/app/node_modules/retry-request/index.js:165:11)
at PassThrough.emit (node:events:525:35)
at /opt/app/node_modules/teeny-request/build/src/index.js:191:27
```

With the `google` bucket vendor and using api-server `0.8.4-4`

If the recording doesn't exist, perhaps don't show the waveform.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the api-server path that retrieves recordings from the Google bucket when a recent call is opened. Reproduce the missing-object case described in the issue and trace how the error reaches the webapp. Done means a call without a recording no longer crashes the service or logs the user out, and its waveform is not shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, javascript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.