Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataset.delete() throws unfriendly error when empty #375

Open
metalwarrior665 opened this issue May 13, 2019 · 2 comments
Open

dataset.delete() throws unfriendly error when empty #375

metalwarrior665 opened this issue May 13, 2019 · 2 comments

Comments

@metalwarrior665
Copy link
Member

@metalwarrior665 metalwarrior665 commented May 13, 2019

I vote for doing nothing instead of an error.

2019-05-13T13:31:32.244Z ERROR: The function passed to Apify.main() threw an exception: (error details: type=record-not-found, statusCode=404, url=http://172.31.48.146:8010/v2/datasets/o7zkQCiQNecGhTDzi, method=DELETE)
2019-05-13T13:31:32.246Z   ApifyClientError: Record was not found
2019-05-13T13:31:32.248Z     at exports.newApifyClientErrorFromResponse (/home/myuser/node_modules/apify-client/build/utils.js:87:12)
2019-05-13T13:31:32.250Z     at makeRequest (/home/myuser/node_modules/apify-client/build/utils.js:169:19)
2019-05-13T13:31:32.251Z     at process._tickCallback (internal/process/next_tick.js:68:7)
@metalwarrior665
Copy link
Member Author

@metalwarrior665 metalwarrior665 commented Sep 4, 2019

This code now works

const dataset = await Apify.openDataset('TEST');
await dataset.drop();

So I think the behavior changed over time. We can close this.

@metalwarrior665
Copy link
Member Author

@metalwarrior665 metalwarrior665 commented Jan 16, 2020

Happened again in 0.18.1 actually. Now I'm confused about why my test worked. Don't want to share whole private run.

2020-01-16T08:58:31.874Z   ApifyClientError: Dataset was not found```
@mnmkng mnmkng removed the low priority label Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.