Server should give better response when script cannot be called due to unsufficient authorization
Created by: Quazgar
Currently, the server only gives a 500 error when trying to run a server-side script, when the user is not logged in:
A POST request to https://localhost:10443/scripting
with argument call: foo.py
returns this response:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://localhost:10443/webinterface/webcaosdb.xsl" ?>
<Response srid="847a8704a9832976d61a061022df85e" timestamp="1570629981560" baseuri="https://localhost:10443">
<UserInfo>
<Roles>
<Role>anonymous</Role>
</Roles>
</UserInfo>
<Error code="500" description="An unexpected server error has occurred.">SRID = 847a8704a9832976d61a061022df85e
Please report this server error to and include the SRID into your report.</Error>
</Response>
A 401 response or similar seems more appropriate.
Imported comments:
By Timm Fitschen on 2019-10-21T07:35:27.299Z
assigned to @timm.fitschen
By Quazgar on 2019-10-10T07:10:29.095Z
changed title from Server should give better response when script cannot be called due to unsifficient authorization to Server should give better response when script cannot be called due to unsufficient authorization