Skip to content

No error handling for the POST /weather endpoint #3

Description

@pixelomer

Sending an invalid request or a valid request with an invalid city name will crash the application.

weatherApp/app.js:30
            temperature = weatherData.main.temp;
                                           ^

TypeError: Cannot read properties of undefined (reading 'temp')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions