Skip to content
Snippets Groups Projects
Commit 97154497 authored by michael.minelli's avatar michael.minelli
Browse files

Merge branch 'limit-of-two-ex-per-assignment' into v3.4.0

parents 51591509 5108073c
No related branches found
No related tags found
No related merge requests found
{
"name": "dojo_cli",
"version": "3.4.0",
"version": "3.4.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "dojo_cli",
"version": "3.4.0",
"version": "3.4.1",
"license": "AGPLv3",
"dependencies": {
"appdata-path": "^1.0.0",
......
{
"name" : "dojo_cli",
"description" : "CLI of the Dojo project",
"version" : "3.4.0",
"version" : "3.4.1",
"license" : "AGPLv3",
"author" : "Michaël Minelli <dojo@minelli.me>",
"main" : "dist/app.js",
......
......@@ -142,8 +142,12 @@ class DojoBackendManager {
if ( verbose ) {
if ( error instanceof AxiosError ) {
if ( error.response ) {
if ( error.response.status === StatusCodes.CONFLICT ) {
spinner.fail(`You've already reached the max number of exercise of this assignment.`);
if ( error.response.status === StatusCodes.INSUFFICIENT_SPACE_ON_RESOURCE ) {
if ( error.response.data && (error.response.data as DojoBackendResponse<Array<GitlabUser>>).code === DojoStatusCode.MAX_EXERCISE_PER_ASSIGNMENT_REACHED ) {
spinner.fail(`The following users have reached the maximum number of exercise of this assignment : ${ ((error.response.data as DojoBackendResponse<Array<GitlabUser>>).data as Array<GitlabUser>).map(user => user.name).join(', ') }.`);
} else {
spinner.fail(`You've already reached the max number of exercise of this assignment.`);
}
} else {
if ( (error.response.data as DojoBackendResponse<unknown>).code === DojoStatusCode.EXERCISE_CREATION_GITLAB_ERROR ) {
spinner.fail(`Exercise creation error: An unknown error occurred while creating the exercise on Gitlab. Please try again later or contact an administrator.`);
......
Subproject commit 89f3579ca9009f793742170928d808ab4c35d931
Subproject commit 75f67b647da34337f3b220cacf78b2115d6022bc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment