Skip to content

Unhelpful error messages in Custom Functions section #616

@stefanlenoach

Description

@stefanlenoach

Has your issue been reported?

  • I have searched the existing issues and confirm it has not been reported.
  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

I'm trying to write a custom function that turns a LatLng into a city name. When I try to run my function in the custom function section I get an incomprehensible error that just says "Error in - distance". I don't use the word distance at all in the function

Expected Behavior

More useful/debug-able error messages in the custom functions section.

Steps To Reproduce

  1. Create a new custom function.
  2. Make the input a LatLng named latlng and the return type a string
  3. Add these imports:
    import 'dart:async'; import 'package:geocoder/geocoder.dart'; import 'package:geolocator/geolocator.dart';
  4. Paste this code into the function:
  final addresses = await Geocoder.local.findAddressesFromCoordinates(coordinates);

  if (addresses.isNotEmpty) {
    final first = addresses.first;
    return first.locality;
  }

  return null;

Try saving the code.

Bug Report Code

IT4si/LlvJJPm+Fc1pDqY+57/WAROWZ7UIEkscpCRQ4bfb7tBIt3Z87QP1VDTbzjSlFpfGCmp14C06nQhYf1VO43By+ubJh4yZd6EAzgJWKmRZeTF7izPUdAM99RflSZ0qeFvhZAJtR1V3g1wzu2F/OvUjDZNb7rC0QwSq/LZO4=

Context

I just want a working custom function that turns the LatLng into a city name. But at a higher level it seems the error messages given for the custom functions section is very lacking.

Additional info

No response

Environment

- FlutterFlow version: 3.1
- Platform: MacOS Desktop
- Browser name and version: Brave 1.48
- Operating system and version affected: macOS Ventura 13.1

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions