Skip to content

Commit a8c19a0

Browse files
committed
fix(backoffice): topbar search via FeaturesPage graph + lifecycle test hardening
1 parent e721d16 commit a8c19a0

6 files changed

Lines changed: 209 additions & 456 deletions

File tree

otoroshi/app/next/models/Api.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,8 @@ object Api {
18081808
"error" -> "invalid_state_transition",
18091809
"error_description" -> s"transition from '${from.name}' to '${to.name}' is not allowed",
18101810
"from" -> from.name,
1811-
"to" -> to.name
1811+
"to" -> to.name,
1812+
"http_status_code" -> 400
18121813
)
18131814

18141815
// Fields that MUST go through Draft + deploy when the API is not in staging.
@@ -1844,7 +1845,8 @@ object Api {
18441845
.obj(
18451846
"error" -> "cannot_create_in_state",
18461847
"error_description" -> s"new API must be created in 'staging' state, got '${entity.state.name}'",
1847-
"state" -> entity.state.name
1848+
"state" -> entity.state.name,
1849+
"http_status_code" -> 400
18481850
)
18491851
.leftf
18501852
} else {
@@ -1862,7 +1864,8 @@ object Api {
18621864
.obj(
18631865
"error" -> "production_readonly",
18641866
"error_description" -> s"fields ${fields.mkString("[", ", ", "]")} are read-only in '${oldApi.state.name}' state; edit them via Draft and deploy",
1865-
"fields" -> fields
1867+
"fields" -> fields,
1868+
"http_status_code" -> 400
18661869
)
18671870
.leftf
18681871
} else {

0 commit comments

Comments
 (0)