stella-project / stella-app

Multi-container application of the STELLA infrastructure
GNU General Public License v3.0
2 stars 1 forks source link

Calling the session exit endpoint results in server error #45

Closed jueri closed 2 months ago

jueri commented 3 years ago

Calling the endpoint to exit an existing session, for example http://0.0.0.0:8080/stella/api/v1/sessions/42/exit to exit session 42, results in a server error 500.

The database, queried by the stella-app logs this error message:

db_1                        | 2021-07-20 13:34:38.990 UTC [125] ERROR:  operator does not exist: character varying = integer at character 359
db_1                        | 2021-07-20 13:34:38.990 UTC [125] HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.
db_1                        | 2021-07-20 13:34:38.990 UTC [125] STATEMENT:  SELECT sessions.id AS sessions_id, sessions.start AS sessions_start, sessions."end" AS sessions_end, sessions.site_user AS sessions_site_user, sessions.system_ranking AS sessions_system_ranking, sessions.system_recommendation AS sessions_system_recommendation, sessions.exit AS sessions_exit, sessions.sent AS sessions_sent 
db_1                        |   FROM sessions 
db_1                        |   WHERE sessions.id = 42
jueri commented 2 months ago

This was most likely a bug in the test as the database expects session IDs to be strings, not integers. The endpoint was updated in fbaee1e7e60bcf0769b548d5131da134cb19d0c5.