Skip to main content

formidable

PropertyValue
Packageformidable
Versions Covered>=3.0.0
Contract Version1.0.0
Statusproduction
Last Verified2026-02-27
Maintainercorpus-team

Installation

npm install formidable

Covered Functions

This contract covers 1 function(s):

parse()

Parses form data from HTTP request

Import:

import { parse } from 'formidable';

Postconditions

What happens after calling this function:

🔴 ERROR - formidable-001

Condition: form parsing fails due to invalid data or size limits

Throws: Error with parsing details

Required Handling:

Caller MUST handle parsing errors in event listener or try-catch

📖 Source


Example: Proper Error Handling

import formidable from 'formidable';

async function example() {
try {
const result = await parse(/* args */);
// Handle success
return result;
} catch (error) {
// Handle error according to contract postconditions
console.error('Error:', error);
throw error;
}
}

See Also