Skip to content

Commit

Permalink
response text for 403
Browse files Browse the repository at this point in the history
  • Loading branch information
jalowe13 committed Nov 22, 2024
1 parent 147b20f commit fae17f1
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions client/src/redux/sagas/datafiles.sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,21 +492,10 @@ export async function uploadFileUtil(api, scheme, system, path, file) {
body: formData,
});
if (!request.ok) {
// Error Information is here
// 403, 404, Inline and UI
// Tapis Errors, Inline
/*
switch (code) {
case 400:
if (ClientTapisMessage) {
return 'themessage';
}
// Return client side message
return message;
if (request.status === 403) {
const responseText = await request.text();
throw new Error(responseText);
}
*/
console.log(request);
throw new Error(request.status);
}
return request;
}
Expand Down Expand Up @@ -571,7 +560,7 @@ export function* uploadFile(api, scheme, system, path, file, index) {

yield put({
type: 'DATA_FILES_SET_ERROR',
payload: { message: 'Error Right here' },
payload: { message: e.toString() },
});
return 'ERR';
}
Expand Down

0 comments on commit fae17f1

Please sign in to comment.