mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
Improve logging (#274)
* Add some custom log messages * Add original URL and remote IP to each log entry
This commit is contained in:
committed by
GitHub
parent
9c5553cc32
commit
1976e5ab3f
@@ -47,9 +47,13 @@ class TenantsController < ApplicationController
|
||||
|
||||
CreateWelcomeEntitiesWorkflow.new().run
|
||||
|
||||
logger.info { "New tenant registration: #{Current.tenant.inspect}" }
|
||||
|
||||
render json: @tenant, status: :created
|
||||
|
||||
rescue ActiveRecord::RecordInvalid => exception
|
||||
logger.error { "Error in tenant registration: #{exception}" }
|
||||
|
||||
render json: { error: exception }, status: :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user