Open Norc opened 3 years ago
Error is caused by login details not transferring correctly to the bundles_mine API request.
XHR GET https://staging.adventurelibrary.art/bundles/mine?limit=20&skip=0 [HTTP/2 401 Unauthorized 153ms] Error in fetch(): Route requires you to be logged in
advl-api : bundles.ts line 206. requireUser: true.
export const bundles_mine = newHandler({
requireUser: true
}, async ({query, user}) => {
query.user_id = user.id
const result = await searchBundles(query)
return {
status: 200,
body: result
}
})
This seems to be the same issue when opening the add to bundle modal from the home page. https://staging.adventurelibrary.art/bundles/mine?limit=20&skip=0 Returns a 401 Unauthorized error as well.
Error returned from the handler for handlerOpts as user undefined. advl-api: handlers.ts, line 108.
if (opts.includeUser || opts.requireUser) {
let user : User | undefined
try {
user = await getEventUser(_evt)
} catch (ex) {
console.log('Error getting event user', ex)
}
if (!user && opts.requireUser) {
return errorResponse(_evt, `Route requires you to be logged in`, 401)
}
Sometimes/inconsistently works on first load, showing the bundles. But moving to another page or moving to Settings and back to My Bundles causes the error repeatedly after that.
Logged in, clicked "New bundle" and got this:
Also date joined is missing, in addition to the more obvious issue.