{"record":{"id":"43b58ce2f5bba8c1","repo":"usebruno/bruno","slug":"import-wsdl-collection-failed-err-message","errorCode":null,"errorMessage":"Import WSDL collection failed: ${err.message}","messagePattern":"Import WSDL collection failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-converters/src/wsdl/wsdl-to-bruno.js","lineNumber":1128,"sourceCode":"export const wsdlToBruno = async (wsdlContent) => {\n  try {\n    if (typeof wsdlContent !== 'string') {\n      throw new Error('WSDL content must be a string');\n    }\n\n    // Parse WSDL using enhanced parser\n    const parser = new WSDLParser();\n    const wsdlData = await parser.parse(wsdlContent);\n\n    const collection = parseWSDLCollection(wsdlData);\n    const transformedCollection = transformItemsInCollection(collection);\n    const hydratedCollection = hydrateSeqInCollection(transformedCollection);\n    const validatedCollection = validateSchema(hydratedCollection);\n\n    return validatedCollection;\n  } catch (err) {\n    console.error(err);\n    throw new Error('Import WSDL collection failed: ' + err.message);\n  }\n};\n\nexport { WSDLParser, XMLSampleGenerator };\nexport default wsdlToBruno;\n","sourceCodeStart":1110,"sourceCodeEnd":1134,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-converters/src/wsdl/wsdl-to-bruno.js#L1110-L1134","documentation":"Thrown by the top-level wsdlToBruno catch when any stage of the WSDL import pipeline fails. It wraps the original error's message (err.message) into 'Import WSDL collection failed: ...' and logs the full error via console.error. Stages covered: type check, WSDLParser.parse, parseWSDLCollection, transformItemsInCollection, hydrateSeqInCollection, validateSchema.","triggerScenarios":"Any failure inside the pipeline: the type guard (error 131), 'No definitions' (error 130), schema validation failure (error 129), or an exception inside parseWSDLCollection/transformItemsInCollection.","commonSituations":"Corrupt WSDL; missing WSDL features the Bruno translator expects (e.g. no bindings or services); @usebruno/schema version mismatch producing a validation failure.","solutions":["Read the message suffix and stderr (console.error on line 1127) — they carry the original error and stack.","Isolate the stage: log wsdlData after parser.parse to confirm parsing succeeded before schema validation.","Validate the WSDL with a standalone SOAP/WSDL validator first."],"exampleFix":"// before\nconst col = await wsdlToBruno(content);\n\n// after\ntry {\n  const col = await wsdlToBruno(content);\n} catch (e) {\n  console.error('wsdl import failure, content snippet:', content.slice(0, 200));\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"if (typeof wsdlContent !== 'string' || !/<wsdl:definitions|<definitions/.test(wsdlContent)) {\n  throw new Error('Provide a valid WSDL string with a <definitions> root.');\n}","typeGuard":null,"tryCatchPattern":"try {\n  return await wsdlToBruno(content);\n} catch (e) {\n  console.error('wsdl import failed; first 200 chars:', content.slice(0, 200));\n  throw e;\n}","preventionTips":["Pre-validate the WSDL string (type + root element) before calling.","Keep @usebruno/schema and bruno-converters versions aligned.","Log the parsed wsdlData before schema validation to isolate parse vs. validate failures."],"tags":["wsdl","import","bruno-converters","error-wrapping","pipeline"],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}