Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb5ed0bd

Browse files
EmyrkThomasK33
authored andcommitted
chore: return forbidden over internal error agent get ssh key (#17713)
1 parent60faeb9 commitb5ed0bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎coderd/gitsshkey.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ func (api *API) agentGitSSHKey(rw http.ResponseWriter, r *http.Request) {
145145
}
146146

147147
gitSSHKey,err:=api.Database.GetGitSSHKey(ctx,workspace.OwnerID)
148+
ifhttpapi.IsUnauthorizedError(err) {
149+
httpapi.Forbidden(rw)
150+
return
151+
}
148152
iferr!=nil {
149153
httpapi.Write(ctx,rw,http.StatusInternalServerError, codersdk.Response{
150154
Message:"Internal error fetching git SSH key.",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp