Closed gary-woods closed 7 years ago
The pin can't be placed so throwing an exception is kinda 'expected' behavior. If you want your code to continue so you can show something to your end-user you can always catch the exception in your code using a try/catch block
try {
// your code
} catch(DirkGroenen\Pinterest\Exceptions\PinterestException $e) {
// Do something or silently ignore
}
Firstly, what an outstanding piece of code you have here. Thank you for piecing this together so that I don't have to!
When creating a pin, if the image URL leads to a 404 page, then we receive a fatal error. Is it possible to adjust the code so that it is not a fatal error which essentially stops the rest of the PHP code from running.
You can simply try it using an image URL that doesn't exist.
You will receive the following error: