mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
merge: 合并上游 v0.1.86 到 main 分支
This commit is contained in:
commit
496173da1f
469 files changed
+65006
-3674
No files matched your search
@@ -76,7 +76,7 @@ func TestOpenAIHandleErrorResponse_NoRuleKeepsDefault(t *testing.T) {
|
||||
}
|
||||
account := &Account{ID: 12, Platform: PlatformOpenAI, Type: AccountTypeAPIKey}
|
||||
|
||||
_, err := svc.handleErrorResponse(context.Background(), resp, c, account)
|
||||
_, err := svc.handleErrorResponse(context.Background(), resp, c, account, nil)
|
||||
require.Error(t, err)
|
||||
assert.Equal(t, http.StatusBadGateway, rec.Code)
|
||||
|
||||
@@ -157,7 +157,7 @@ func TestOpenAIHandleErrorResponse_AppliesRuleFor422(t *testing.T) {
|
||||
}
|
||||
account := &Account{ID: 2, Platform: PlatformOpenAI, Type: AccountTypeAPIKey}
|
||||
|
||||
_, err := svc.handleErrorResponse(context.Background(), resp, c, account)
|
||||
_, err := svc.handleErrorResponse(context.Background(), resp, c, account, nil)
|
||||
require.Error(t, err)
|
||||
assert.Equal(t, http.StatusTeapot, rec.Code)
|
||||
|
||||
|
||||
Reference in new issue
Block a user