diff --git a/.changeset/twelve-kiwis-live.md b/.changeset/twelve-kiwis-live.md new file mode 100644 index 0000000000..e305bf0b18 --- /dev/null +++ b/.changeset/twelve-kiwis-live.md @@ -0,0 +1,5 @@ +--- +"@unkey/api": minor +--- + +Add the types for error codes diff --git a/packages/api/src/errors.ts b/packages/api/src/errors.ts index 866ff16421..f04cedbeb8 100644 --- a/packages/api/src/errors.ts +++ b/packages/api/src/errors.ts @@ -2,4 +2,10 @@ import type { paths } from "./openapi"; // this is what a json body response looks like export type ErrorResponse = - paths["/v1/liveness"]["get"]["responses"]["500"]["content"]["application/json"]; + | paths["/v1/liveness"]["get"]["responses"]["400"]["content"]["application/json"] + | paths["/v1/liveness"]["get"]["responses"]["401"]["content"]["application/json"] + | paths["/v1/liveness"]["get"]["responses"]["403"]["content"]["application/json"] + | paths["/v1/liveness"]["get"]["responses"]["404"]["content"]["application/json"] + | paths["/v1/liveness"]["get"]["responses"]["409"]["content"]["application/json"] + | paths["/v1/liveness"]["get"]["responses"]["429"]["content"]["application/json"] + | paths["/v1/liveness"]["get"]["responses"]["500"]["content"]["application/json"];