-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
Hello!
Right now when you search for a resource/author that doesn't exist you get an interesting response:
{
"id": null,
"title": null,
"tag": null,
"current_version": null,
"native_minecraft_version": null,
"supported_minecraft_versions": null,
"icon_link": "https://www.spigotmc.org/styles/default/xenresource/resource_icon.png",
"author": {
"id": null,
"username": null
},
"premium": {
"price": null,
"currency": null
},
"stats": {
"downloads": null,
"updates": null,
"reviews": {
"unique": null,
"total": null
},
"rating": null
},
"description": null
}{
"id": null,
"username": null,
"resource_count": null,
"identities": {},
"avatar": "https://www.spigotmc.org/styles/spigot/xenforo/avatars/avatar_male_l.png"
}My suggestion is just adding a 404 error when this happens:
{"code":404,"message":"Resource not found."}By doing this way, we (devs that use the API) can easily catch the error rather than checking if a value is null.
Also.... Thanks for this amazing tool.