Closed lenkan closed 5 months ago
Same issue also when doing oobis().get('')
with stack trace:
keria-1 | Agent: EBZx2tc3vL9QqnLPbp1F8gu5XHazlX5HJ7o0ddIVsMSz Controller: EIjF9At_rwAQtpPsXCOVhLsZ2gvInT29wRGbx54mOMGr
keria-1 | 2024-01-26 08:03:00 [FALCON] [ERROR] GET /identifiers//oobis?role=agent => Traceback (most recent call last):
keria-1 | File "/keria/venv/lib/python3.10/site-packages/keri/db/dbing.py", line 458, in getVal
keria-1 | return(txn.get(key))
keria-1 | lmdb.BadValsizeError: mdb_get: MDB_BAD_VALSIZE: Unsupported size of key/DB name/data, or wrong DUPFIXED size
keria-1 |
keria-1 | During handling of the above exception, another exception occurred:
keria-1 |
keria-1 | Traceback (most recent call last):
keria-1 | File "falcon/app.py", line 365, in falcon.app.App.__call__
keria-1 | File "/keria/src/keria/app/aiding.py", line 633, in on_get
keria-1 | hab = agent.hby.habByName(name)
keria-1 | File "/keria/venv/lib/python3.10/site-packages/keri/app/habbing.py", line 788, in habByName
keria-1 | elif (habord := self.db.habs.get(name)) is not None:
keria-1 | File "/keria/venv/lib/python3.10/site-packages/keri/db/koming.py", line 281, in get
keria-1 | return (self.deserializer(self.db.getVal(db=self.sdb,
keria-1 | File "/keria/venv/lib/python3.10/site-packages/keri/db/dbing.py", line 460, in getVal
keria-1 | raise KeyError(f"Key: `{key}` is either empty, too big (for lmdb),"
keria-1 | KeyError: "Key: `b''` is either empty, too big (for lmdb), or wrong DUPFIXED size. ref) lmdb.BadValsizeError"
keria-1 |
Closed with PR #178 that is in the 0.1.0 release candidate
Similar to #126. Keria responds with internal server error when doing a GET on path
/identifiers/
.See reproduction script: https://github.com/lenkan/signify-ts/blob/fdc96e9b17b34b3e1de471d22a0ae19a186fe899/examples/integration-scripts/trigger-internal-server-error.test.ts
Stack trace:
I believe we should do some input validation here and respond with a 4xx error. What do you think?
In my opinion, all these input validation issues are important before bumping to v1. For example, when you are monitoring KERIA in a production environment, you must be able to distinguish between actual internal server errors and client errors. Since we are using OpenAPI to some extent, most of the input validation can be generated using the json schemas.