microlinkhq / open

4 stars 2 forks source link

Microlink API: Better Errors #13

Closed Kikobeats closed 6 years ago

Kikobeats commented 6 years ago

Related:

Kikobeats commented 6 years ago

Could be API response be improved as well?

{
  "status": "fail",
  "message": "\"foobar\" is not a valid HTTP URL. It should be have protocol (http or https)."
}

vs

{
  "status": "fail",
  "data": {
    "url": "\"foobar\" is not a valid HTTP URL. It should be have protocol (http or https)."
  }
  "message": "The petition was declined, check the errors above."
}