microsoft / microsoft/azurechat

When trying to attach a file I get this error - RestError: Authorization failed

Open
#330 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.4k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
1

Description

When trying to attach a file (.pdf) I am getting this error:
http://localhost:3000/chat/O7RD85ROElgoBg6w7tsz65jocftx2d0j45yw
0:["$@1",["development",null]]
1:{"status":"ERROR","errors":[{"message":"RestError: Authorization failed."}]}

I think based on the POST attempt to chat/[id] folder this is the page that was supposed to be called/posted to.
src\app(authenticated)\chat[id]\page.tsx

src\features\chat-page\chat-input\file\file-store.ts
src\features\chat-page\chat-services\chat-document-service.ts >> I suspect CrackDocument function is problematic.

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the PDF attachment failure at the reported chat page, then inspect src/features/chat-page/chat-input/file/file-store.ts and src/features/chat-page/chat-services/chat-document-service.ts, especially the suspected CrackDocument function. Check how the POST from src/app/(authenticated)/chat/[id]/page.tsx is authorized; done means a PDF can be attached without the RestError authorization failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.