Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProFormA Export: An invalid API token is not reported correctly #1680

Open
MrSerth opened this issue Sep 23, 2024 · 1 comment
Open

ProFormA Export: An invalid API token is not reported correctly #1680

MrSerth opened this issue Sep 23, 2024 · 1 comment
Labels

Comments

@MrSerth
Copy link
Member

MrSerth commented Sep 23, 2024

I just tried pushing a task from CodeHarbor to CodeOcean. However, when the API token is not valid, no nice error message is shown:

Bildschirmfoto 2024-09-23 um 23 53 44

Since I was running CodeOcean in development, I could quickly identify the issue:

Started POST "/import_task" for 127.0.0.1 at 2024-09-23 23:52:09 +0200
Processing by ExercisesController#import_task as */*
  CodeharborLink Load (0.5ms)  SELECT "codeharbor_links".* FROM "codeharbor_links" WHERE "codeharbor_links"."api_key" = $1 LIMIT $2  [["api_key", "<filtered>"], ["LIMIT", 1]]
  ↳ app/controllers/exercises_controller.rb:195:in `user_by_codeharbor_token'
Completed 401 Unauthorized in 3ms (Views: 0.1ms | ActiveRecord: 0.2ms | Allocations: 943)

When fixing this issue, we should further look into CodeOcean and the error handling there:

Bildschirmfoto 2024-09-23 um 23 59 18

As it shows, we are simply showing a JSON there. Is this expected?

@MrSerth MrSerth added the bug label Sep 23, 2024
@MrSerth
Copy link
Member Author

MrSerth commented Sep 23, 2024

At least for CodeOcean (and potentially CodeHarbor), we should further check the escaping of text displayed:

Bildschirmfoto 2024-09-24 um 00 52 00 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant