public class SlingGraphQLErrorHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
GRAPHQL_ERROR_CAUSE |
static String |
GRAPHQL_ERROR_CAUSE_STACKTRACE |
static String |
GRAPHQL_ERROR_DETAIL |
static String |
GRAPHQL_ERROR_ERRORS |
static String |
GRAPHQL_ERROR_EXCEPTION |
static String |
GRAPHQL_ERROR_EXTENSIONS |
static String |
GRAPHQL_ERROR_MESSAGE |
static int |
MAX_STACK_TRACE_DEPTH
Keep only this many level of exception stack traces
|
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Object> |
toSpecification(String customMessage,
Exception e)
Structures the given error information into a
Map following GraphQL error specification. |
public static final String GRAPHQL_ERROR_EXTENSIONS
public static final String GRAPHQL_ERROR_MESSAGE
public static final String GRAPHQL_ERROR_DETAIL
public static final String GRAPHQL_ERROR_EXCEPTION
public static final String GRAPHQL_ERROR_CAUSE
public static final String GRAPHQL_ERROR_CAUSE_STACKTRACE
public static final String GRAPHQL_ERROR_ERRORS
public static int MAX_STACK_TRACE_DEPTH
public static Map<String,Object> toSpecification(String customMessage, Exception e)
Map following GraphQL error specification.customMessage - custom message to be included in the response.e - exception.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.