Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API calls returning 400 #98

Open
ffernn-dev opened this issue Apr 1, 2024 · 3 comments
Open

API calls returning 400 #98

ffernn-dev opened this issue Apr 1, 2024 · 3 comments

Comments

@ffernn-dev
Copy link

[In Australia if it makes a difference]
So my 'today' feed is loading fine, but /me, /memories and /comment are spitting HTTP 400s.
Here's the browser console output:

[Log] D (memories-cf17d99fae2b5e22.js, line 1)
code: "ERR_BAD_REQUEST"
config: {transitional: {silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false}, adapter: ["xhr", "http"], transformRequest: Array, transformResponse: Array, timeout: 0, …}
message: "Request failed with status code 400"
name: "AxiosError"
request: XMLHttpRequest {listeners: Object, onreadystatechange: null, readyState: 4, timeout: 0, withCredentials: false, …}
response: {data: {status: "error"}, status: 400, statusText: "", headers: tm, config: Object, …}
stack: "@https://toofake.lol/_next/static/chunks/154-26c97a7090d4b522.js:6:3999…"
D Prototype

And HTTP request/response:

:method: POST
:scheme: https
:authority: toofake.lol
:path: /api/memories
Content-Type: application/json
Accept: application/json, text/plain, */*
Sec-Fetch-Site: same-origin
Accept-Encoding: gzip, deflate, br
Accept-Language: en-AU,en;q=0.9
Sec-Fetch-Mode: cors
Host: toofake.lol
Origin: https://toofake.lol
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15
Connection: keep-alive
Content-Length: 349
Sec-Fetch-Dest: empty

:status: 400
Content-Type: application/json; charset=utf-8
ETag: "v1uzzlc7sri"
Date: Mon, 01 Apr 2024 05:56:00 GMT
Content-Length: 18
Cache-Control: public, max-age=0, must-revalidate
Server: Vercel
Strict-Transport-Security: max-age=63072000
x-vercel-id: syd1::iad1::tbzhp-1711950960093-ecdfaa1229e5
x-matched-path: /api/memories
x-vercel-cache: MISS

Will try running locally and see what I can debug.

@ffernn-dev
Copy link
Author

Hrm I've cloned and run it, and there are no issues now...
Everything loads fine, no errors.

@s-alad
Copy link
Owner

s-alad commented Apr 1, 2024

think it might have to do with BeReal blocking requests from the hosted instance on vercel

@ffernn-dev
Copy link
Author

Ahh gotcha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants