#(Chous) Hide webget unknownHostException

58 messages · Page 1 of 1 (latest)

jolly elbow
#

Is there a way to hide java.net.UnknownHostException when using webget with invalid host? hide_failure doesn't do the thing

lethal mirageBOT
#

(Chous) Hide webget unknownHostException

lethal mirageBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

next iron
#

!debug

analog loomBOT
# next iron !debug
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

next iron
#

while the debug mode is enabled, preferably

jolly elbow
#

So I'm basically making a thing so that players can bind their own resoucepacks to their nickname and others can download and use it while playing on the server. And I check the validity of the resourcepack via webget

#

Maybe there is a better way

next iron
#

sounds cool!

analog loomBOT
# next iron !logcheck https://paste.denizenscript.com/View/103267
Server Version

Paper version git-Paper-271 (MC: 1.19.2)-- (Current build :white_check_mark:)

Plugin Version(s)

Citizens: 2.0.30-SNAPSHOT (build 2721) -- (:warning:Outdated build, behind by 44)
Denizen: 1.2.5-SNAPSHOT (build 1778-REL) -- (Outdated build, behind by 1)

Checked For

@next iron

Java Version

19 :warning: - Only Java versions 17, 16, and 8 are fully supported

Possibly Relevant Plugin(s)

ViaVersion: 4.4.2 - Mixed client vs server versions can sometimes cause packet-related issues.

next iron
#

you are pretty outdated in citizens, just as a note for you to keep that updated with the rest of your version information;

#

(unrelated though)

#

can you paste your script or re-run the command with debug enabled?

#

!haste

analog loomBOT
jolly elbow
#

a lot of the lines there is because of my tab completion generator

next iron
#

https://nasral.net/url.zip is invalid

#

the link either doesn't exist or is broken; are you sure it was uploaded correctly?

jolly elbow
#

That's the whole point

jolly elbow
next iron
#

...oh actually yeah

#

<entry[result].status||fail> with 'fail' is weird

#

!command webget tag

analog loomBOT
# next iron !command webget tag
Group

core

Syntax

webget [<url>] (data:<data>) (method:<method>) (headers:<map>) (timeout:<duration>/{10s}) (savefile:<path>) (hide_failure)

Short Description

Gets the contents of a web page or API response.

Description

Connects to a webpage or API and downloads its contents, to be used via the save argument and corresponding entry tags.

This should almost always be ~waited for. Refer to !language ~waitable.

Note that while this will replace URL spaces to %20, you are responsible for any other necessary URL encoding.
You may want to use the !tag ElementTag.url_encode tag for this.

Optionally, use "data:<data>" to specify a set of data to send to the server (changes the default method from GET t...

Related Tags

<entry[saveName].failed> returns whether the webget failed. A failure occurs when the status is no...
<entry[saveName].result> returns the text of the result of the webget. This is null only if webget...
<entry[saveName].result_binary> returns the raw binary data of the result of the webget. This is n...
<entry[saveName].result_headers> returns a MapTag of the headers returned from the webserver. Ever...
<entry[saveName].status> returns the HTTP status code of the webget. This is null only if webget failed to connect to the url.
<entry[saveName].time_ran> returns a DurationTag indicating how long the web connection processing took.
<ElementTag.url_encode> Encodes the element using URL encoding.

jolly elbow
#

Is that the problem or?

next iron
#

mmm

#

<entry[saveName].status> returns the HTTP status code of the webget. This is null only if webget failed to connect to the url.
per the null note; you may benefit from instead checking <entry[saveName].failed> instead maybe?

jolly elbow
#

Ima try that brb

#

Still the same thing

#

The problem is not with the tag, but with the webget command

#

I believe

vestal fog
# analog loom

You're also very outdated on Denizen, by at least a few 10's of versions

#

!update Denizen

analog loomBOT
jolly elbow
vestal fog
#

You're one release build behind, each release build has several dev builds with bug fixes and improvements

jolly elbow
#

alright thank you

jolly elbow
#

may this be a denizen bug that wrong host doesn't get hidden with hide_failure perhaps?

quasi saddleBOT
barren niche
#

oh

#

that's like a

#

hardfail

#

that fails so hard the fail cleanup fails too

barren niche
#

wait wtf