upload: cleans up error handling

This commit is contained in:
@wwwjim 2020-10-07 03:02:08 -07:00
parent 79d54aa50c
commit beb49cd31e

View File

@ -59,9 +59,9 @@ export const formMultipart = async (req, res, { user, bucketName }) => {
});
return reject({
decorator: "SERVER_BUCKETS_PUSH_ISSUE",
decorator: "SERVER_UPLOAD_ERROR",
error: true,
message: e,
message: e.message,
});
}
@ -81,9 +81,9 @@ export const formMultipart = async (req, res, { user, bucketName }) => {
});
return reject({
decorator: "SERVER_BUCKET_STREAM_FAILURE",
decorator: "SERVER_UPLOAD_ERROR",
error: true,
message: e,
message: e.message,
});
});
@ -121,9 +121,9 @@ export const formMultipart = async (req, res, { user, bucketName }) => {
});
return {
decorator: "SERVER_BUCKETS_VERIFY_ISSUE",
decorator: "SERVER_UPLOAD_ERROR",
error: true,
message: e,
message: e.message,
};
}