11  Common Errors and Warnings in the API

If an analysis request to the SEDT API fails, users may get information about that failure at the “Upload User Files” or the “Get Output Data Status” endpoints.

  1. “Upload User Files” endpoint: An error is indicated by a non-201 HTTP status code in the API response.
  2. “Get Output Data Status” endpoint: An error is indicated by a non-200 HTTP status code in the API response OR a value of True in the error-messages field of the API response.

We’ll discuss the common error and warning messages users may receive from each endpoint below.

Upload User Files Endpoint

The Upload User Files API endpoint returns error information via the status_code and error_message fields in the API response. Common potential errors include the following:

# A tibble: 11 × 3
   `Error Message`                        `Error Description` `HTTP Status Code`
   <chr>                                  <chr>                            <dbl>
 1 "\"Only CSV and TSV files are allowed… "Raised when resou…                400
 2 "\"413 Request Entity Too Large\""     "Raised when resou…                413
 3 "\"No appropriate CSV encoding. CSV c… "Raised when resou…                400
 4 "\"[column] is expected to be a colum… "Raised when the s…                400
 5 "\"Columns cannot hold more than 10 i… "Raised when basel…                400
 6 "\"Column cannot be empty\""           "Raised when basel…                400
 7 "\"[column] must be a string\""        "Raised when key o…                400
 8 "\"[geo_value] is not in 'national', … "Raised when the g…                400
 9 "\"ACS Data Year should start with '2… "Raised when an in…                400
10 "\"[Demographic/Baseline] Geo ID Colu… "Raised when geoid…                400
11 "Invalid file_id"                      "Raised when a use…                500

Get Output Data Status Endpoint

The “Get Data Status” API endpoint returns information on a set of potential errors and warning messages for each analysis submitted to the API. We provide more information on these errors and warnings below. For more information on the endpoint and response format, see Chapter 9.

Error Messages

These messages are provided when an error occurs that causes the analysis to fail. If any error message is returned in the “Get Data Status” response, the error-messages field within the updates field of the response will be set to True.

# A tibble: 13 × 2
   `Error Message`                           `Error Description`                
   <chr>                                     <chr>                              
 1 form-data-parameter-validation-failed     "Indicates whether the Upload User…
 2 data_readin_error                         "Indicates that one of the resourc…
 3 df_conversion_to_gdf_failed               "Indicates whether the resource da…
 4 weight_coltypes_mismatch                  "Indicates that the weight column …
 5 pts_not_in_any_geography                  "Indicates that the points in the …
 6 sjoin_failed                              "Indicates that the spatial join b…
 7 unable_to_generate_presigned_urls         "Indicates that the process of gen…
 8 dem/geo_cols_not_in_data                  "Indicates that supplemental demog…
 9 dem/geo_colls_cannot_be_converted_numeric "Indicates that at least one of th…
10 invalid_column_in_data                    "Indicates that one of the user-pr…
11 latlon_cols_not_in_data                   "Indicates that the specified lati…
12 lat_lon_cannot_be_converted_numeric       "Indicates that the latitude and/o…
13 all_rows_filtered                         "Indicates that the filter conditi…

Warning Messages

These messages are provided to alert the user to behavior that may be indicative of a concern but does not cause the analysis to fail.

# A tibble: 12 × 2
   `Warning Message`                                       `Warning Description`
   <chr>                                                   <chr>                
 1 multiple_geographies_flag                               Indicates whether th…
 2 num_null_latlon_rows_dropped                            Indicates the number…
 3 num_null_weight_rows_dropped                            Indicates the number…
 4 num_out_of_geography_rows_dropped                       Indicates the number…
 5 multiple_geographies_list                               If multiple_geograph…
 6 few_sub_geos_flag                                       Indicates that the u…
 7 dem/geo_dropped_over_half_values_greater_than_total_pop Provides the names o…
 8 dem/geo_values_greater_than_total_pop                   Provides the names o…
 9 dem/geo_dropped_over_half_values_negative               Provides the names o…
10 dem/geo_dropped_any_values_negative_margin              Provides the names o…
11 dem/geo_values_negative                                 Provides the names o…
12 dem/geo_float_values                                    Provides the names o…