next-tinacms-dos 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/handlers.js CHANGED
@@ -115,6 +115,8 @@ async function uploadMedia(req, res, client, bucket, mediaRoot, cdnUrl) {
115
115
  src: cdnUrl + (mediaRoot ? import_path.default.join(mediaRoot, prefix + filename) : prefix + filename)
116
116
  });
117
117
  } catch (e) {
118
+ console.error("Error uploading media");
119
+ console.error(e);
118
120
  res.status(500).send(findErrorMessage(e));
119
121
  }
120
122
  }
@@ -177,6 +179,8 @@ async function listMedia(req, res, client, bucket, mediaRoot, cdnUrl) {
177
179
  offset: response.NextMarker
178
180
  });
179
181
  } catch (e) {
182
+ console.error("Error listing media");
183
+ console.error(e);
180
184
  res.status(500);
181
185
  const message = findErrorMessage(e);
182
186
  res.json({ e: message });
@@ -202,6 +206,8 @@ async function deleteAsset(req, res, client, bucket) {
202
206
  const data = await client.send(new import_client_s3.DeleteObjectCommand(params));
203
207
  res.json(data);
204
208
  } catch (err) {
209
+ console.error("Error deleting media");
210
+ console.error(err);
205
211
  res.status(500).json({
206
212
  message: err.message || "Something went wrong"
207
213
  });