TheDogAPI: do not assume every image includes breed information
The Dog API entry refers to TheDogAPI, not Dog CEO. Its image examples include an empty breeds array and document filters for requesting breed-associated images.
Handle missing breed metadata before reading the first array element. If your application promises a breed description, request the appropriate data and still provide a sensible fallback rather than inventing a label from the filename.
1件のコメント