mirror of
https://github.com/langgenius/dify.git
synced 2026-02-24 18:05:11 +00:00
refactor(web): replace String.match() with RegExp.exec() for non-global regex (#32386)
This commit is contained in:
@@ -31,7 +31,7 @@ export const parsePluginErrorMessage = async (error: any): Promise<string> => {
|
||||
// Try to extract nested JSON from PluginInvokeError
|
||||
// Use greedy match .+ to capture the complete JSON object with nested braces
|
||||
const pluginErrorPattern = /PluginInvokeError:\s*(\{.+\})/
|
||||
const match = rawMessage.match(pluginErrorPattern)
|
||||
const match = pluginErrorPattern.exec(rawMessage)
|
||||
|
||||
if (match) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user