From 9e486ff413f1951e557a9816729007067bf8588f Mon Sep 17 00:00:00 2001 From: "Dr. Strangelove" Date: Wed, 18 Dec 2024 14:09:35 -0500 Subject: [PATCH] fix: raise TypeError on marshal_dump (#100) * fix: raise TypeError on marshal_dump * chore: fix copyright header --- lib/looker-sdk/error.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/looker-sdk/error.rb b/lib/looker-sdk/error.rb index d5f4e68..2529a5c 100644 --- a/lib/looker-sdk/error.rb +++ b/lib/looker-sdk/error.rb @@ -1,7 +1,7 @@ ############################################################################################ # The MIT License (MIT) # -# Copyright (c) 2022 Looker Data Sciences, Inc. +# Copyright (c) 2024 Google, LLC # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -76,6 +76,12 @@ def message response_message end + # Looker SDK error objects (e.g. LookerSDK::BadRequest) raise a + # WebMock::NetConnectNotAllowedError if they are marshal dumped. + def marshal_dump + raise TypeError.new("Refusing to marshal") + end + # Error Doc URL # # @return [String]