You've already forked agentic-coding-workflow
feat(chat): migration 0004 + errs codes for chat/llm/storage
This commit is contained in:
@@ -51,6 +51,25 @@ func TestHTTPStatus(t *testing.T) {
|
||||
CodeWorktreePathInvalid: http.StatusBadRequest,
|
||||
CodeGitCredentialInvalid: http.StatusBadRequest,
|
||||
CodeWorktreeNotHeldByCaller: http.StatusForbidden,
|
||||
// Chat codes
|
||||
CodeChatConversationNotFound: http.StatusNotFound,
|
||||
CodeChatMessageNotFound: http.StatusNotFound,
|
||||
CodeChatMessageNotPending: http.StatusConflict,
|
||||
CodeChatConcurrentMessage: http.StatusConflict,
|
||||
CodeChatAttachmentTooLarge: http.StatusRequestEntityTooLarge,
|
||||
CodeChatAttachmentUnsupportedMime: http.StatusUnsupportedMediaType,
|
||||
CodeChatModelCapabilityMismatch: http.StatusConflict,
|
||||
CodeChatTemplateNotFound: http.StatusNotFound,
|
||||
CodeChatEndpointNotFound: http.StatusNotFound,
|
||||
CodeChatModelNotFound: http.StatusNotFound,
|
||||
// LLM codes
|
||||
CodeLLMUpstream: http.StatusBadGateway,
|
||||
CodeLLMTimeout: http.StatusGatewayTimeout,
|
||||
CodeLLMRateLimited: http.StatusTooManyRequests,
|
||||
CodeLLMContextTooLong: http.StatusBadRequest,
|
||||
// Storage codes
|
||||
CodeStoragePutFailed: http.StatusBadGateway,
|
||||
CodeStorageGetFailed: http.StatusBadGateway,
|
||||
}
|
||||
for code, want := range cases {
|
||||
require.Equal(t, want, HTTPStatus(code), "code=%s", code)
|
||||
|
||||
Reference in New Issue
Block a user