Skip to content

Commit

Permalink
Remove telemetry from Data.read with URI parameter.
Browse files Browse the repository at this point in the history
This cause Type_Error
  • Loading branch information
Akirathan committed Mar 7, 2025
1 parent b9ca239 commit a5559e2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Data.enso
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ read path=(Missing_Argument.throw "path") format=Auto_Detect (on_problems : Prob
_ : Text -> if Data_Read_Helpers.looks_like_uri path then Data_Read_Helpers.fetch_following_data_links path format=format else
read (File.new path) format on_problems
uri : URI ->
response = fetch uri format=format
Telemetry.log "Data.read" "fetching from URI" (Dictionary.from_vector [["content_length", response.content_length]])
response
fetch uri format=format
_ ->
file_obj = File.new path
if file_obj.is_directory then Error.throw (Illegal_Argument.Error "Cannot `read` a directory, use `Data.list`.") else
Expand Down

0 comments on commit a5559e2

Please sign in to comment.