You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to create a schema, if you send a data structure with no attributes the server will respond with:
500 Internal Server Error
Server got itself in trouble
Server logs:
2020-05-21 17:47:32,561 aries_cloudagent.core.dispatcher ERROR Handler error: schemas_send_schema
Traceback (most recent call last):
File "/home/indy/aries_cloudagent/issuer/indy.py", line 68, in create_and_store_schema
origin_did, schema_name, schema_version, json.dumps(attribute_names),
File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/indy/anoncreds.py", line 71, in issuer_create_schema
issuer_create_schema.cb)
indy.error.CommonInvalidStructure
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/indy/aries_cloudagent/ledger/indy.py", line 301, in create_and_send_schema
public_info.did, schema_name, schema_version, attribute_names,
File "/home/indy/aries_cloudagent/issuer/indy.py", line 68, in create_and_store_schema
origin_did, schema_name, schema_version, json.dumps(attribute_names),
File "/home/indy/aries_cloudagent/indy/error.py", line 27, in __exit__
) from err_value
aries_cloudagent.issuer.base.IssuerError: Error when creating schema: Error: Invalid structure
Caused by: Empty list of Schema attributes has been passed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/indy/aries_cloudagent/messaging/schemas/routes.py", line 110, in schemas_send_schema
issuer, schema_name, schema_version, attributes
File "/home/indy/aries_cloudagent/ledger/indy.py", line 304, in create_and_send_schema
raise LedgerError(err.message) from err
aries_cloudagent.ledger.error.LedgerError: Error when creating schema: Error: Invalid structure
Caused by: Empty list of Schema attributes has been passed
2020-05-21 17:47:32,563 aiohttp.server ERROR Error handling request
Traceback (most recent call last):
File "/home/indy/aries_cloudagent/issuer/indy.py", line 68, in create_and_store_schema
origin_did, schema_name, schema_version, json.dumps(attribute_names),
File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/indy/anoncreds.py", line 71, in issuer_create_schema
issuer_create_schema.cb)
indy.error.CommonInvalidStructure
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/indy/aries_cloudagent/ledger/indy.py", line 301, in create_and_send_schema
public_info.did, schema_name, schema_version, attribute_names,
File "/home/indy/aries_cloudagent/issuer/indy.py", line 68, in create_and_store_schema
origin_did, schema_name, schema_version, json.dumps(attribute_names),
File "/home/indy/aries_cloudagent/indy/error.py", line 27, in __exit__
) from err_value
aries_cloudagent.issuer.base.IssuerError: Error when creating schema: Error: Invalid structure
Caused by: Empty list of Schema attributes has been passed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/home/indy/.pyenv/versions/3.6.9/lib/python3.6/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware
return await handler(request)
File "/home/indy/aries_cloudagent/admin/server.py", line 192, in apply_limiter
return await task
File "/home/indy/aries_cloudagent/messaging/schemas/routes.py", line 110, in schemas_send_schema
issuer, schema_name, schema_version, attributes
File "/home/indy/aries_cloudagent/ledger/indy.py", line 304, in create_and_send_schema
raise LedgerError(err.message) from err
aries_cloudagent.ledger.error.LedgerError: Error when creating schema: Error: Invalid structure
Caused by: Empty list of Schema attributes has been passed
It should instead catch the error and respond with a more helpful message and appropriate HTTP status code.
The text was updated successfully, but these errors were encountered:
When trying to create a schema, if you send a data structure with no attributes the server will respond with:
Server logs:
It should instead catch the error and respond with a more helpful message and appropriate HTTP status code.
The text was updated successfully, but these errors were encountered: