Skip to content

Commit 1b4a112

Browse files
authored
Merge pull request #406 from EmileRolley/fix-Xtoken-registration-errmsg
fix: better error msg for X-token registration
2 parents e82c23e + e27415c commit 1b4a112

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/state/learnocaml_store.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,9 @@ module Token = struct
339339

340340
let register ?(allow_teacher=false) token =
341341
if not allow_teacher && is_teacher token then
342-
Lwt.fail (Invalid_argument "Registration of teacher token not allowed")
342+
Lwt.fail
343+
(Invalid_argument "Registration of teacher token forbidden. \
344+
Logout and use a new teacher token?")
343345
else
344346
Lwt.catch (fun () ->
345347
Lwt_io.with_file ~mode:Lwt_io.Output ~perm:0o700 (save_path token)

0 commit comments

Comments
 (0)