puter icon indicating copy to clipboard operation
puter copied to clipboard

descriptive error messages

Open triptych opened this issue 1 year ago • 4 comments

in puter.hosting.create you have the following error states: A Promise that will resolve to a subdomain object when the subdomain has been created. If a subdomain with the given name already exists, the promise will be rejected with an error. If the path does not exist, the promise will be rejected with an error.

however there is another error case : when the user has used up all their custom domains. I ran into this when I was testing my app which auto creates hosted sites.

The error messaage was just internal server error - and not very helpful. Can you return more descriptive error messages like for this use case "you have exceeded the 50 custom url quota" or something.

triptych avatar May 28 '24 01:05 triptych

I changed the label - any server response with code 500 is considered a bug until we find out otherwise. I'll be looking into this one shortly - thanks for reporting!

KernelDeimos avatar Jun 22 '24 20:06 KernelDeimos

I wasn't able to reproduce this issue. Is it possible you're not receiving this error because of the subdomain limit but instead some other reason? If you can send an example of a request you're sending I can more easily narrow down the possibilities.

KernelDeimos avatar Jun 22 '24 22:06 KernelDeimos

Sure I'll try to reproduce

triptych avatar Jun 23 '24 19:06 triptych

@triptych did you get chance to reproduce this?

jelveh avatar Jul 05 '24 02:07 jelveh