Skip to content

Handeling error when fetch failed #51

@ghassanmas

Description

@ghassanmas

https://github.com/FACK1/Beauty/blob/9b9fd916ac116cd49da420cdd949c2ef3d92101f/public/main.js#L34r

The catch of the fetch will run whenever an error was thrown e.g. respose.json() may throw an error the if the response is not JSON type, so you could replace that line with some relvent message you did in line 29

alert("Sorry, No Match Found");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions