ankraft / ACME-oneM2M-CSE

An open source CSE Middleware for Education.
https://acmecse.net/
BSD 3-Clause "New" or "Revised" License
23 stars 16 forks source link

Fixing case when HTTP Response status is an unhandled value #91

Closed tsengia closed 1 year ago

tsengia commented 1 year ago

In the Web UI, there is a missing case in the switch statement for handling the display of the HTTP response from the CSE. If there is an error (ie. response code 500), this switch statement would fail to make an assignment, which results in the variable s being undefined, so nothing gets displayed in the response body.

My small change adds a default case to the switch statement to catch this error case so that everything prints as expected.

ankraft commented 1 year ago

Again, thanks a lot!