mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-26 23:45:49 +03:00
[GH-ISSUE #207] Fatal error when invalid ID is used #143
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @samcera on GitHub (Nov 10, 2020).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/207
When I use the error handling code (as described in the example doc and posted below) I receive a fatal error (posted below as well). Judging from issue #176 it seems that this is expected behavior for invalid ID's. However, if that's the case I don't seem to understand what the code below does. It's not showing me a echoed 404 in the response (or in the headers). Is this still expected behavior for invalid ID's or am I missing something here? I intended to check if the ID I use to call Spotify is valid, before proceeding with the other code. Any help is greatly appreciated :)
@jwilsson commented on GitHub (Nov 11, 2020):
Hey!
It's a slight error in the documentation. The
SpotifyWebAPIExceptionclass is missing its namespace.Adding that will make it work:
@samcera commented on GitHub (Nov 11, 2020):
Thanks! Working beautifully now 👍