You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At random times, my query returns this placeholder image for no results, while no error is thrown.
Context
I use the UnsplashClient().randomPhoto(fromSearch: [searchTerm]) call with searchTerm being a name of a city entered by a user. The result of this call seems to always be .success.
The text was updated successfully, but these errors were encountered:
Hi @afkatja! and thank you for using the library 😃
Regarding your question, Unsplash API always returns an image like this one when it couldn't find a proper image. In this case, if you use the search and the API can not find any photo related to the search terms, then, it returns this photo.
The problem is that is hard to decide if this image is the real photo or the not-found photo. That's why you receive this image through the .success.
This is more a question than an issue.
What
At random times, my query returns this placeholder image for no results, while no error is thrown.
Context
I use the
UnsplashClient().randomPhoto(fromSearch: [searchTerm])
call withsearchTerm
being a name of a city entered by a user. Theresult
of this call seems to always be.success
.The text was updated successfully, but these errors were encountered: