DavesCodeMusings / container-central

A minimalist, not quite ready for prime time solution to managing Docker containers.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

"API Request Failed" message for /images #19

Closed DavesCodeMusings closed 1 month ago

DavesCodeMusings commented 1 month ago

Navigating to /images fails when accessing the Images menu item in the client. Yet, the Home menu item also gets /images and succeeds. Also, /images in a REST client succeeds. Clicking an image name in container detail fails as well.

DavesCodeMusings commented 1 month ago

The API actually responds with a list of images, but the client seems to be confused about its success.

Requested view is: images [script.js:17:11](http://isis.home:8088/script.js)
Focus is: <empty string> [script.js:18:11](http://isis.home:8088/script.js)
Fetching image info from http://isis.home:8088/images [script.js:487:11](http://isis.home:8088/script.js)
XHRGET
http://isis.home:8088/images
[HTTP/1.1 304 Not Modified 68ms]

23 image(s) retrieved. [script.js:496:15](http://isis.home:8088/script.js)
alert: API request failed. [script.js:46:11](http://isis.home:8088/script.js)
DavesCodeMusings commented 1 month ago

Catch block is too big to know what's actually causing the error. Need to rework. If only JavaScript had try-catch-else

DavesCodeMusings commented 1 month ago

Fixed with commit https://github.com/DavesCodeMusings/container-central/commit/2080529943b2a2594643017a05d42240977531df