Add details to error response for POST /api/v1/accounts in REST API (#15803)
		
	This commit is contained in:
		
					parent
					
						
							
								b4cb8c3c83
							
						
					
				
			
			
				commit
				
					
						9aa37b32c3
					
				
			
		
					 12 changed files with 72 additions and 23 deletions
				
			
		|  | @ -27,6 +27,8 @@ class Api::V1::AccountsController < Api::BaseController | |||
| 
 | ||||
|     self.response_body = Oj.dump(response.body) | ||||
|     self.status        = response.status | ||||
|   rescue ActiveRecord::RecordInvalid => e | ||||
|     render json: ValidationErrorFormatter.new(e, :'account.username' => :username, :'invite_request.text' => :reason).as_json, status: :unprocessable_entity | ||||
|   end | ||||
| 
 | ||||
|   def follow | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue