Skip to content

Bad error message when photo ID is missing #83

@winternet-studio

Description

@winternet-studio

If you do the following code:

$photo = \Crew\Unsplash\Photo::find(null);
$download_url = $photo->download();

This is of course a bad ID argument for the find() method but I did this by mistake and it took a while before I realized the issue because the only error message I got was this:

EXCEPTION

[]

File: .../vendor/crewlabs/unsplash/src/Endpoint.php
Line: 87
#0 .../vendor/crewlabs/unsplash/src/Photo.php(208): Crew\Unsplash\Endpoint::__callStatic('get', Array)
#1 .../models/Unsplash.php(88): Crew\Unsplash\Photo->download()

Would be nice if this could be caught and notified clearly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions