client/jsonapi/src/Client/JsonApi/Base.php
protected function getErrorDetails( \Exception $e, $domain = null )
	{
		$details = [];

		if( $domain !== null ) {
			$details['title'] = $this->context->getI18n()->dt( $domain, $e->getMessage() );
		} else {
			$details['title'] = $e->getMessage();
		}

		/** client/jsonapi/debug
		 * Send debug information withing responses to clients if an error occurrs
		 *
		 * By default, the Aimeos client JSON REST API won't send any details
		 * besides the error message to the client if an error occurred. This
		 * prevents leaking sensitive information to attackers. For debugging
		 * your requests it's helpful to see the stack strace. If you set this
		 * configuration option to true, the stack trace will be returned too.
		 *
		 * @param boolean True to return the stack trace in JSON response, false for error message only
		 * @since 2017.07
		 * @category Developer
		 */
		if( $this->context->getConfig()->get( 'client/jsonapi/debug', false ) == true ) {
			$details['detail'] = $e->getTraceAsString();
		}

		return [$details]; // jsonapi.org requires a list of error objects
	}
protected function getErrorDetails( \Exception $e, $domain = null )
	{
		$details = [];

		if( $domain !== null ) {
			$details['title'] = $this->context->getI18n()->dt( $domain, $e->getMessage() );
		} else {
			$details['title'] = $e->getMessage();
		}

		/** client/jsonapi/debug
		 * Send debug information withing responses to clients if an error occurrs
		 *
		 * By default, the Aimeos client JSON REST API won't send any details
		 * besides the error message to the client if an error occurred. This
		 * prevents leaking sensitive information to attackers. For debugging
		 * your requests it's helpful to see the stack strace. If you set this
		 * configuration option to true, the stack trace will be returned too.
		 *
		 * @param boolean True to return the stack trace in JSON response, false for error message only
		 * @since 2017.07
		 * @category Developer
		 */
		if( $this->context->getConfig()->get( 'client/jsonapi/debug', false ) == true ) {
			$details['detail'] = $e->getTraceAsString();
		}

		return [$details]; // jsonapi.org requires a list of error objects
	}
protected function getErrorDetails ( \ Exception $ e , $ domain = null ) { $ details = [ ] ; if ( $ domain !== null ) { $ details [ 'title' ] = $ this -> context -> getI18n ( ) -> dt ( $ domain , $ e -> getMessage ( ) ) ; } else { $ details [ 'title' ] = $ e -> getMessage ( ) ; } /** client/jsonapi/debug
		 * Send debug information withing responses to clients if an error occurrs
		 *
		 * By default, the Aimeos client JSON REST API won't send any details
		 * besides the error message to the client if an error occurred. This
		 * prevents leaking sensitive information to attackers. For debugging
		 * your requests it's helpful to see the stack strace. If you set this
		 * configuration option to true, the stack trace will be returned too.
		 *
		 * @param boolean True to return the stack trace in JSON response, false for error message only
		 * @since 2017.07
		 * @category Developer
		 */ if ( $ this -> context -> getConfig ( ) -> get ( 'client/jsonapi/debug' , false ) == true ) { $ details [ 'detail' ] = $ e -> getTraceAsString ( ) ; } return [ $ details ] ; // jsonapi.org requires a list of error objects }
Returns the translated title and the details of the error

@param \Exception $e Thrown exception
@param string|null $domain Translation domain
@return array Associative list with "title" and "detail" key (if debug config is enabled)
Returns the translated title and the details of the error