# About the "error" output field from location sensor

**URL:** <https://community.thunkable.com/t/about-the-error-output-field-from-location-sensor/33423>\
**Category:** Questions about Thunkable X\
**Created:** [June 28, 2018, 12:40am UTC](https://community.thunkable.com/t/about-the-error-output-field-from-location-sensor/33423 "2018-06-28T00:40:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![debxsmith](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@debxsmith](https://community.thunkable.com/u/debxsmith)\
**Post date:** [June 28, 2018, 12:40am UTC](https://community.thunkable.com/t/about-the-error-output-field-from-location-sensor/33423/1 "2018-06-28T00:40:07Z")

</div>

The GetCurrentLocation method of the location sensor returns several outputs, one of which is “error”. What type of value do I check for to determine whether there is an error? Null? Empty string? Something else? The documentation doesn’t mention this field. Thanks.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [June 28, 2018, 5:40am UTC](https://community.thunkable.com/t/about-the-error-output-field-from-location-sensor/33423/2 "2018-06-28T05:40:23Z")

</div>

Any output can be safely connected directly to Label.Text and see its value. If “[Object object]” is displayed, then this is an object, if “null”, “undefined”, etc., it can be either a string or an object having a string representation. This value can be brought to the string type by connecting it through the text block “join” and compare it with the value of the string in the text block.

In our case, Location.error = “undefined” if there is no error.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [June 29, 2018, 12:10am UTC](https://community.thunkable.com/t/about-the-error-output-field-from-location-sensor/33423/3 "2018-06-29T00:10:57Z")

</div>

The `error` block will either be a non-empty string or will be undefined. The former is interpreted as true and the latter as false. Conseqeuently, the easiest thing is to just plug the `error` block into the `if` or `test` block. Like so:

![31%20PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/f/df1a6abbaa94e4caa535007c7d25b35bc3d8c10c.png)

or

![49%20PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/e/debdd4b588fca94cd9d49204974b1c9f3f73f319.png)

Happy thunking!

-Mark

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:02pm UTC](https://community.thunkable.com/t/about-the-error-output-field-from-location-sensor/33423/4 "2024-11-08T12:02:19Z")

</div>


