paras
03/30/2023, 4:55 PMzizi
03/30/2023, 5:26 PMKlowner
03/30/2023, 5:38 PMkian
03/30/2023, 5:41 PMkian
03/30/2023, 5:53 PMkian
03/30/2023, 5:59 PMadd-IV
03/30/2023, 6:04 PMJames
03/30/2023, 6:05 PMadd-IV
03/30/2023, 6:05 PMJames
03/30/2023, 6:05 PMJames
03/30/2023, 6:06 PMMatt
03/30/2023, 8:46 PMErwin
03/30/2023, 9:48 PMGeorgeTailor
03/30/2023, 10:03 PMErisa | Support Engineer
03/30/2023, 10:05 PMGeorgeTailor
03/30/2023, 10:06 PMPOST /api/document/upload 401 Unauthorized (5.87ms)
or
POST /api/document/upload 403 Forbidden (9.48ms)
I try to upload a file and when a user is not authenticated or does not have sufficient rights I return respective codesGeorgeTailor
03/30/2023, 10:07 PMGeorgeTailor
03/30/2023, 10:07 PMGeorgeTailor
03/30/2023, 10:07 PMGeorgeTailor
03/30/2023, 10:12 PMconst formData = await context.request.formData();
before any checking logic for 401 and 403 (or returning any response at all) solves this issue. Any idea why?hanpolo
03/30/2023, 10:33 PM0xcaff
03/30/2023, 11:04 PMJames
03/30/2023, 11:07 PMkian
03/30/2023, 11:51 PM0xcaff
03/31/2023, 1:37 AMfour33
03/31/2023, 1:40 AMSyntaxError: Unexpected token ':'
at VMScriptRunner.runAsModule (../node_modules/jest-environment-miniflare/node_modules/@miniflare/runner-vm/src/index.ts:34:20)
I'm running jest
with NODE_OPTIONS=--experimental-vm-modules
four33
03/31/2023, 1:41 AM0xcaff
03/31/2023, 1:45 AM