Bug 56808 - Warning: "Attribute status just available for MIME type application/json"
Warning: "Attribute status just available for MIME type application/json"
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-11-08 15:18 CET by Jürn Brodersen
Modified: 2023-11-08 18:00 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.051
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürn Brodersen univentionstaff 2023-11-08 15:18:00 CET
When watching student computers the following warning gets logged:

```
08.11.23 05:40:02.442  MODULE      ( PROCESS ) : Received request 'computerroom/screenshot': ('Administrator', None, None, 'en_US.UTF-8')
08.11.23 05:40:02.469  PARSER      ( WARN    ) : Attribute status just available for MIME type application/json
```

Log file: /var/log/univention/management-console-module-computerroom.log

Problem: https://git.knut.univention.de/univention/ucs/-/blob/5.0-5/management/univention-management-console/src/univention/management/console/base.py?ref_type=heads#L471

`res.status` should only be set if the mimetype is `_MIMETYPE_JSON`.

Alternatively we might want to discuss if the status attribute should be handled more generic as an http status outside/additionally to the json key. Similar to header and cookie:
https://git.knut.univention.de/univention/ucs/-/blob/5.0-5/management/univention-management-console/src/univention/management/console/message.py?ref_type=heads#L95

Note:
If you want to test this using the computerroom you can use this jenkins job to get a test environment:
https://jenkins2022.knut.univention.de/job/UCSschool-5.0/view/Environments/job/CreateVeyonEnvironmentKVM/
Comment 1 Florian Best univentionstaff 2023-11-08 18:00:17 CET
(In reply to Jürn Brodersen from comment #0)
> Alternatively we might want to discuss if the status attribute should be
> handled more generic as an http status outside/additionally to the json key.
> Similar to header and cookie:
yes, since we dropped UMCP this is possible now. Let's do it.