Skip to content

[Bug] Timeout fault #36

@b5414

Description

@b5414

Hi, there is a simple example with the latest version of the tiny package

try{
	const data = {test: true};

	await tiny.post({
		url: 'some url for post tests',
		data,
		timeout: 15000,
		headers: {Authorization: 'Bearer ' + token},
	}).then(({body})=>({ok: true, data: body})).catch((e)=>({ok: false, err: e.message + 'this not working'}));
}catch(err){
	console.log('this working', err);
}

Unfortunately it returns err: 'timeout is not defined'

and only the external trycatch works, instead of the promised one

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions