Returns HTML instead of JSON in case of a HTTP 404 response #5

Closed
opened 2023-01-10 12:49:55 +01:00 by paul · 0 comments
Owner

It should not return HTML. For example, if you do a request just after starting, you get:

$ curl http://localhost:2356/
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>404 Not Found</title>
</head>
<body align="center">
    <div role="main" align="center">
        <h1>404: Not Found</h1>
        <p>The requested resource could not be found.</p>
        <hr />
    </div>
    <div role="contentinfo" align="center">
        <small>Rocket</small>
    </div>
</body>
</html>

Copied from #4 from autarco-scraper.

It should not return HTML. For example, if you do a request just after starting, you get: ```console $ curl http://localhost:2356/ <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>404 Not Found</title> </head> <body align="center"> <div role="main" align="center"> <h1>404: Not Found</h1> <p>The requested resource could not be found.</p> <hr /> </div> <div role="contentinfo" align="center"> <small>Rocket</small> </div> </body> </html> ``` _Copied from [#4](https://git.luon.net/paul/autarco-scraper/issues/4) from [autarco-scraper](https://git.luon.net/paul/autarco-scraper)._
paul added the
bug
label 2023-01-10 12:50:50 +01:00
paul self-assigned this 2023-01-16 21:06:30 +01:00
paul added this to the 0.3.0 milestone 2023-01-16 21:07:43 +01:00
paul closed this issue 2023-01-16 21:10:20 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: paul/solar-grabber#5
No description provided.