matrix-org / matrix-org/matrix-hookshot

Widget: Misleading error message on "Error: User is not permitted to provision connections for GitLab"

Open
#575 0 comments 0 reactions 0 assignees View on GitHub
GitLab T-Defect
Dominant language
TypeScript
Stars
450
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
23

Description

## Steps to reproduce
1. Have someone else set up hookshot and the widget.
2. Open the widget.
3. Open the GitLab section.

## Expected
The widget tells you that you don't have the permissions to set up a GitLab connection.

## Actual
* The UI says `Error occured during widget load: There was an error fetching search results.`
![Screenshot 2022-11-21 at 10-40-33 Element Matrix Wrench](https://user-images.githubusercontent.com/10872136/203017412-54aeba9b-8a84-4176-a54a-2679719a7ce9.png)

* The JavaScript console knows about the actual issue:
![Screenshot_2022-11-21_10-38-43](https://user-images.githubusercontent.com/10872136/203017207-9839644b-78dd-43bf-a045-dfe3941dada4.png)
```
Failed to get connection targets from query: Error: User is not permitted to provision connections for GitLab
Bt https://matrix.datanauten.de/hookshot/widgetapi/v1/static/assets/index.8ae1a773.js:5
request https://matrix.datanauten.de/hookshot/widgetapi/v1/static/assets/index.8ae1a773.js:5
index.8ae1a773.js:41:11707
```

Contributor guide

Open the contributing guide

Research direction

Start in the widget's GitLab section and reproduce the failure when opening it with insufficient provisioning permissions. Trace the “Failed to get connection targets from query” path shown in the widget's compiled index.8ae1a773.js asset, then ensure the UI displays the permission error instead of the generic search-results message.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
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.