DO Ideas 2

More useful error messages in Droplet Creation API

When creating a server-stack recently, I (accidentally) kept passing the wrong payload structure to the API, but, i just kept getting 500's from DO's API with the error message:

#1
{"name":"[SERVER-PREFIX-core","region":"lon1","size":"1gb","image":"ubuntu-16-04-x64","backups":"false","ipv6":"false","private_networking":"true","monitoring":"true","user_data":"","tags":["[SERVER-PREFIX]","[SERVER-PREFIX]-core-server","monitor"]}

#2
{"name":"[SERVER-PREFIX-db1","region":"lon1","size":{"command":"server:stack-database","clientname":"abott","databaseserver-size":"2gb"},"image":"centos-7-x64","backups":"false","ipv6":"false","private_networking":"true","monitoring":"true","tags":["[SERVER-PREFIX]","[SERVER-PREFIX]-db","monitor"]}

In #2 payload, the size is an object, not a string, but the API kept returning:

string(88) "{"id": "internal_server_error", "message": "Server was unable to give you a response." }"

Not very useful.

  • Anonymous
  • Sep 11 2018
  • Attach files
  • Tim commented
    September 11, 2018 15:47

    I totally agree with this!