feat: improve model price error UX with role-aware messages and cleaner UI
- Backend: differentiate error messages for admin vs regular users in price.go - Backend: include error_code in channel test response for structured error handling - Frontend: render model_price_error as a styled card in Playground with admin nav button - Frontend: show inline error details and settings link in channel test modal - Frontend: parse error codes from both SSE and non-streaming API responses - i18n: remove redundant "Settings" suffix from setting tab translations (en/fr/ru/ja/vi) - i18n: update "Group & Model Pricing" translations across all locales
This commit is contained in:
@@ -390,6 +390,12 @@ func ErrOptionWithNoRecordErrorLog() NewAPIErrorOptions {
|
||||
}
|
||||
}
|
||||
|
||||
func ErrOptionWithStatusCode(statusCode int) NewAPIErrorOptions {
|
||||
return func(e *NewAPIError) {
|
||||
e.StatusCode = statusCode
|
||||
}
|
||||
}
|
||||
|
||||
func ErrOptionWithHideErrMsg(replaceStr string) NewAPIErrorOptions {
|
||||
return func(e *NewAPIError) {
|
||||
if common.DebugEnabled {
|
||||
|
||||
Reference in New Issue
Block a user