Revize 221e78c2
Přidáno uživatelem Michal Seják před téměř 4 roky(ů)
src/controllers/certificates_controller.py | ||
---|---|---|
155 | 155 |
extensions=extensions |
156 | 156 |
) |
157 | 157 |
except CryptographyException as e: |
158 |
return {"success": False, "data": e.message}, C_INTERNAL_SERVER_ERROR
|
|
158 |
return E_WRONG_PARAMETERS, C_BAD_REQUEST
|
|
159 | 159 |
|
160 | 160 |
if cert is not None: |
161 | 161 |
return {"success": True, |
tests/integration_tests/rest_api/certificates_test.py | ||
---|---|---|
581 | 581 |
"extensions": "woowee=thisshouldbeinvalidithink" |
582 | 582 |
} |
583 | 583 |
created_ret = server.post("/api/certificates", content_type="application/json", json=certificate) |
584 |
assert created_ret.status_code == 500
|
|
584 |
assert created_ret.status_code == 400
|
|
585 | 585 |
|
586 | 586 |
|
587 | 587 |
def test_get_cert_private_key(server): |
Také k dispozici: Unified diff
Re #8704 - Minor fix (return code 500 -> 400)