• Suppressing HTTPRequest TLS Errors

    From Codefenix@VERT/CONCHAOS to All on Fri Mar 25 11:22:12 2022
    Some backround info for context..ããI'm writing a simple weather forecast reader in JS which makes use of multipleãAPIs for determining location data and then forecast data based on that location.ããFor US cities, the weather.gov API takes a specified latitude and longitude as URL parameters, and gives you a forecast URL for that area. Since the average person walking around typically doesn't have latitude and longitude coordinates commited to memory, I decided to use another API, geocode.maps.co, to return the latitude and longitude for a specified city.ããI have all of this working. However whenever I make the HTTPRequest call to geocode.maps.co, SBBS logs TLS errors to error.log like this one:ããterm 33736 TLS ERROR 'No data was read because the remote system closed the connection (recv() == 0)' (-1) popping dataããThis happens on *successful* HTTPRequest calls to this API. The HTTPRequest is getting the response from the API containing the json data for the specified input, but it's logging a TLS error at the same time. The calls are placed in a try/catch block, but the catch does not get hit in this scenario.ããTo the user, it appears nothing is wrong whatsoever. But to me, I see TLS errors logged every time someone uses the functionality to query location data. None of the other APIs I'm using are leading to this outcome; just this one.ããWhich leads me to my question: is there a way I can suppress those TLS errors, or am I stuck with them cluttering the error.log file?ãã---ã þ Synchronet þ -=[ conchaos.synchro.net | ConstructiveChaos BBS ]=-ã
  • From Digital Man@VERT to Codefenix on Fri Mar 25 12:31:13 2022
    Re: Suppressing HTTPRequest TLS Errorsã By: Codefenix to All on Fri Mar 25 2022 11:22 amãã > Some backround info for context..ã >ã > I'm writing a simple weather forecast reader in JS which makes use ofã > multiple APIs for determining location data and then forecast data based onã > that location.ã >ã > For US cities, the weather.gov API takes a specified latitude and longitudeã > as URL parameters, and gives you a forecast URL for that area. Since theã > average person walking around typically doesn't have latitude and longitudeã > coordinates commited to memory, I decided to use another API,ã > geocode.maps.co, to return the latitude and longitude for a specified city.ã >ã > I have all of this working. However whenever I make the HTTPRequest call toã > geocode.maps.co, SBBS logs TLS errors to error.log like this one:ã >ã > term 33736 TLS ERROR 'No data was read because the remote system closed theã > connection (recv() == 0)' (-1) popping dataã >ã > This happens on *successful* HTTPRequest calls to this API. The HTTPRequestã > is getting the response from the API containing the json data for theã > specified input, but it's logging a TLS error at the same time. The callsã > are placed in a try/catch block, but the catch does not get hit in thisã > scenario.ããYeah, the Socket object doesn't throw JS exceptions. It probably should (rather than directly log errors).ããThere's likely something that the http.js should be doing but isn't, to avoid that error. It's not something I've played with much. I'd see if you can catch deuce on irc.synchro.net #synchronet.ããI could probably do the throwing-exceptions change myself, but the actual "fix" might just be a change to http.js.ãã > To the user, it appears nothing is wrong whatsoever. But to me, I see TLSã > errors logged every time someone uses the functionality to query locationã > data. None of the other APIs I'm using are leading to this outcome; justã > this one.ã >ã > Which leads me to my question: is there a way I can suppress those TLSã > errors, or am I stuck with them cluttering the error.log file?ããFor the moment, yeah, but I'm sure there's a solution.ã-- ã digital man (rob)ããThis Is Spinal Tap quote #26:ãDavid St. Hubbins: They were still booing him when we came on stage.ãNorco, CA WX: 81.9øF, 28.0% humidity, 5 mph ESE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Codefenix@VERT/CONCHAOS to Digital Man on Fri Mar 25 17:11:53 2022
    Re: Suppressing HTTPRequest TLS Errorsã By: Digital Man to Codefenix on Fri Mar 25 2022 12:31 pmãã DM> For the moment, yeah, but I'm sure there's a solution.ããOK, thanks for the reply. I'll live with it for now. :)ãã---ã þ Synchronet þ -=[ conchaos.synchro.net | ConstructiveChaos BBS ]=-ã