Operations
Troubleshooting
Common debugging paths for City, client, token, and env.
client returns 401
Check:
- whether the request includes
Authorization: Bearer <user_token> - whether the token has expired
- whether City has
DOWNCITY_FEDERATION_TOKEN_SIGNING_KEYconfigured - whether the token was issued by the current Federation
- whether the Token's
bureau_idbelongs to the current product
client returns 403
Check:
- whether the Bureau bound to the token has been paused
- whether the target Bureau was
activewhen the admin side issued the token
client returns 404
Check:
- whether the HTTP route is correct
- whether the target service has been registered in City
- whether the target Bureau existed when the admin side issued the token
model not found or handler not hit
Check:
- whether the client-provided
modelhas been registered throughAIChannel.model()+AIService.use() - whether the target model includes the required action for the current pathway, such as
text,stream, orimage - whether the request included the intended model id
- whether
city.ai.catalog()can see the model
These cases usually return 422.
City returns 500
Check:
- whether City has
DOWNCITY_FEDERATION_TOKEN_SIGNING_KEYand a provisioned administrator account - whether the target service has a registered handler
- whether the handler or provider call threw an error without
statusCode - whether the
onErrorhook recorded the original error
provider call failed
Check:
- whether the matching key exists in City
.env - whether the handler reads the correct
input.env()key - whether model
metamatches the current provider calling style
usage not recorded
Check:
- whether
AIServiceandCreditsServiceare mounted beforeUsageServiceand supplied as its readers - whether the AI provider returned final
RuntimeMetering; executions without final metering only increase the execution count - whether the Credits transaction is an applied positive charge; top-ups, failed, and pending transactions are excluded
- whether the query supplies real ordered
fromandtodates plus a valid IANAtimezone