【问题标题】:Ops, an error occurred操作,发生错误
【发布时间】:2015-08-23 19:12:01
【问题描述】:

Mashape 不给我任何支持,除非它的工作时间,所以我希望你能给我一些答案

我正在尝试通过我的 API 上传文件。

有人知道为什么 mashape 会产生这种错误吗?它意味着什么或如何解决或避免它。它不是来自我的服务器。这不是我的 API 永远不会返回的东西。直接向我的 API 发出请求可以正常工作!

[body]    => {"message":"Ops, an error occurred (╯°□°)╯"}
[status]  => 500 Internal Server Error
[headers] => 
   access-control-allow-credentials:true
   Connection:keep-alive
   Content-Length:54
   Content-Type:application/json
   Date:Sun, 23 Aug 2015 18:34:27 GMT
   Server:Mashape/5.0.6
   X-Mashape-Proxy-Response:true

在我看来,这似乎是 Mashapes 代理的问题?

编辑

更多调查表明它与尺寸有关

var content = "kokokoko".repeat(1200); // Uploading a small file works fine
// var content = "kokokoko".repeat(1300); // Uploading a larger file produce the error above
var fd = new FormData();

fd.append("format", 'ttf');
fd.append("file", new Blob([content]), "filename.ext");

$.ajax({
  url: 'https://ofc.p.mashape.com/directConvert/', 
  headers: {'X-Mashape-Key': 'xxxxx'},
  method:"post",
  data: fd,
  cache: false,
  contentType: false,
  processData: false,
})

编辑 2 它现在可以工作,但仍然无法解释消息Ops, an error occurred (╯°□°)╯ 的含义

【问题讨论】:

    标签: mashape


    【解决方案1】:

    我目前正在发生此错误。此特定错误响应来自 maspahe 代理,而不是底层服务。提交了一张帮助票。

    【讨论】:

      猜你喜欢
      • 2012-11-21
      • 1970-01-01
      • 2014-04-21
      • 1970-01-01
      • 2020-01-16
      • 2020-07-08
      • 2021-04-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多