Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

feat: clarify error messages around durable objects beta #1921

Merged
merged 2 commits into from
May 24, 2021

Conversation

nilslice
Copy link
Contributor

Disambiguates error message described in #1859, adds more clarity around other places where Durable Object usage in beta may conflict with wrangler functionality.

@nilslice nilslice requested a review from a team as a code owner May 13, 2021 23:04
@nilslice nilslice linked an issue May 13, 2021 that may be closed by this pull request
let status = res.status();
if !status.is_success() {
let text = res.text()?;
if text.contains("workers.api.error.not_entitled") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is durable objects the only possible reason for not_entitled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not, but it's a temp quick fix until you get DO's to GA.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then is there a reason not to show the original error plus a "If you are trying to use Modules, you need to opt in..."?

As it stands someone's probably going to be more confused, not less, if it has nothing to do with modules or DO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd think there would be a better API error, actually indicating the accurate entitlement missing. But I'm assuming you're not ready to commit to that until GA..

The original error was "Something went wrong!" + the ambiguous workers.api.error.not_entitled.

src/util.rs Outdated Show resolved Hide resolved
Co-authored-by: Ashcon Partovi <[email protected]>
@Electroid Electroid merged commit 76b1e64 into master May 24, 2021
@delete-merged-branch delete-merged-branch bot deleted the sm/issue-1859 branch May 24, 2021 17:05
kflict referenced this pull request in CollectiveSynthesis2021/ORGIN2 Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ambiguous error when uploading ES modules without the entitlement
3 participants