hotosm / galaxy-api

Backend to fetch data from Underpass
https://galaxy-api.hotosm.org/latest/redoc
GNU Affero General Public License v3.0
14 stars 5 forks source link

UndefinedColumn: column "imagery4socialgood" does not exist #292

Open sentry-io[bot] opened 2 years ago

sentry-io[bot] commented 2 years ago

Sentry Issue: GALAXY-API-1H

UndefinedColumn: column "imagery4socialgood" does not exist
LINE 6:             AND th.project_id IN (12549,12549#Imagery4social...
                                                      ^

(33 additional frame(s) were not displayed)
...
  File "/home/ubuntu/galaxy-api/./src/galaxy/app.py", line 71, in print_psycopg2_exception
    raise err
  File "/home/ubuntu/galaxy-api/./src/galaxy/app.py", line 121, in executequery
    self.cursor.execute(query)
  File "newrelic/hooks/database_psycopg2.py", line 64, in execute
    return super(CursorWrapper, self).execute(sql, parameters, *args,
  File "newrelic/hooks/database_dbapi2.py", line 43, in execute
    return self.__wrapped__.execute(sql, **kwargs)
  File "psycopg2/extras.py", line 146, in execute
    return super().execute(query, vars)

Exception in ASGI application
kshitijrajsharma commented 2 years ago

Input like this should not pass validation from frontend , I will keep it here to have those validated on backend as well . We need to make sure they don't come to api in first place at all cc : @d-rita , @ramyaragupathy

d-rita commented 2 years ago

@kshitijrajsharma, was this a request from the frontend? I ask because the frontend already has some validation again non-numerical inputs here, and this would definitely have been flagged.

kshitijrajsharma commented 2 years ago

That's a very good question , If it is being validated on frontend then there most be other people using API directly or from other frontend @d-rita , cc : @ramyaragupathy . API needs to have this validation as well