A little background:
When creating droplets, I had been building a PHP array with the following code:
$data = array( “name” => $name, “region” => “nyc3”, “size” => “512mb”, “image” => [xxxxxxxx], “ssh_keys” => [xxxxxx] );
Today that totally crapped out. I was able to finally figure out I had to change this line:
“image” => [xxxxxxxx],
“image” => “xxxxxxxx”,
After this API change, I’m now doing some error checking in the API’s response by looking for the word “message” (I noticed it appears in error messages from creating droplets as well as from attempting to delete non-existent DNS records – and doesn’t appear in any replies I’ve seen when all is well).
Does that word (“message”) only appear in error messages from the API? Is there a better way to check the API’s response for an error message?
Also, is there any place to monitor for changes like these so we know to go check our code for compliance with the change?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!