rucio / webui

RucioWebUI (v2.0)
Apache License 2.0
4 stars 15 forks source link

Bug 313. Unhandled response status codes in BaseEndpoint #459

Closed MytsV closed 2 months ago

MytsV commented 2 months ago

Fixes #313

Moreover, it makes the message from the server be displayed correctly.

Before: {"status":"error","id":"","name":"","rse_type":"UNKNOWN","volatile":false,"deterministic":false,"staging_area":false,"message":"The requested resource was not found at https://127.0.0.1:8081/rses/?expression=MOCK1. Error Details: [object Object]"} image

After: {"status":"error","id":"","name":"","rse_type":"UNKNOWN","volatile":false,"deterministic":false,"staging_area":false,"message":"The request had invalid syntax. Error Details: {\"ExceptionClass\":\"InvalidRSEExpression\",\"ExceptionMessage\":\"RSE Expression resulted in an empty set.\"}"} image

P. S. I changed the BAD_REQUEST error message, but I undestand that it may sometimes signify that a resource wasn't found. Please let me know if that's okay