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

Stacked 4: Fix error message : details on upload #2566

Merged
merged 3 commits into from
Oct 26, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions resources/js/components/forms/upload/UploadingLine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,16 @@ function process() {
}
})
.catch((error) => {
if (error.response.status === 413) {
errorMessage.value = error.response.data.message;
// prettier-ignore
switch (error.response.status) {
case 413: errorMessage.value = error.response.data.message; break;
case 422: errorMessage.value = error.response.data.message; break;
case 500: errorMessage.value = "Something went wrong, check the logs.";
if (error.response.data.message.includes("Failed to open stream: Permission denied")) {
errorMessage.value = "Failed to open stream: Permission denied";
}
break;
default: break;
}
progress.value = 100;
status.value = "error";
Expand Down