add validation to accompanying periods

This commit is contained in:
2021-11-12 12:07:31 +00:00
parent 39ab7057ce
commit c8135e0741
22 changed files with 337 additions and 88 deletions

View File

@@ -86,7 +86,8 @@ const postParticipation = (id, payload, method) => {
})
.then(response => {
if (response.ok) { return response.json(); }
throw { msg: 'Error while sending AccompanyingPeriod Course participation.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
// TODO: adjust message according to status code? Or how to access the message from the violation array?
throw { msg: 'Error while sending AccompanyingPeriod Course participation', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
});
};