@@ -144,20 +144,21 @@ class ApiClient {
144144 return msg ;
145145 }
146146
147+ // Error titles aligned with backend errorCodeMessages (error.go) for consistency
147148 private getErrorTitle ( code : ErrorCode ) : string {
148149 const titles : Record < ErrorCode , string > = {
149- [ ErrorCode . UNSPECIFIED ] : "Unspecified Error " ,
150- [ ErrorCode . UNKNOWN ] : "Unknown Error " ,
151- [ ErrorCode . INVALID_TOKEN ] : "Authentication Required " ,
152- [ ErrorCode . INVALID_ACTOR ] : "Session Invalid" ,
153- [ ErrorCode . INVALID_USER ] : "User Not Found " ,
154- [ ErrorCode . PERMISSION_DENIED ] : "Access Denied " ,
155- [ ErrorCode . RECORD_NOT_FOUND ] : "Not Found " ,
156- [ ErrorCode . BAD_REQUEST ] : "Invalid Request " ,
157- [ ErrorCode . INTERNAL ] : "Server Error " ,
158- [ ErrorCode . INVALID_CREDENTIAL ] : "Invalid Credentials " ,
159- [ ErrorCode . INVALID_LLM_RESPONSE ] : "AI Response Error " ,
160- [ ErrorCode . PROJECT_OUT_OF_DATE ] : "Project Outdated " ,
150+ [ ErrorCode . UNSPECIFIED ] : "An unspecified error occurred " ,
151+ [ ErrorCode . UNKNOWN ] : "An unknown error occurred " ,
152+ [ ErrorCode . INVALID_TOKEN ] : "Invalid or missing authentication token " ,
153+ [ ErrorCode . INVALID_ACTOR ] : "Invalid actor or session " ,
154+ [ ErrorCode . INVALID_USER ] : "User not found or invalid " ,
155+ [ ErrorCode . PERMISSION_DENIED ] : "Permission denied " ,
156+ [ ErrorCode . RECORD_NOT_FOUND ] : "Record not found " ,
157+ [ ErrorCode . BAD_REQUEST ] : "Bad request " ,
158+ [ ErrorCode . INTERNAL ] : "Internal server error " ,
159+ [ ErrorCode . INVALID_CREDENTIAL ] : "Invalid credentials " ,
160+ [ ErrorCode . INVALID_LLM_RESPONSE ] : "Invalid LLM response " ,
161+ [ ErrorCode . PROJECT_OUT_OF_DATE ] : "Project is out of date " ,
161162 } ;
162163 return titles [ code ] || "Request Failed" ;
163164 }
0 commit comments