File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1212import { GraphError } from "./GraphError" ;
1313import { GraphRequestCallback } from "./IGraphRequestCallback" ;
1414
15+ /**
16+ * @interface
17+ * Signature for the json represent of the error response from the Graph API
18+ * https://docs.microsoft.com/en-us/graph/errors
19+ * @property {[key: string] : string | number } - The Key value pair
20+ */
21+ interface GraphAPIErrorResponse {
22+ error : {
23+ code : string ;
24+ message : string ;
25+ innerError : any ;
26+ } ;
27+ }
28+
1529/**
1630 * @class
1731 * Class for GraphErrorHandler
@@ -57,7 +71,7 @@ export class GraphErrorHandler {
5771 * }
5872 * }
5973 */
60- private static constructErrorFromResponse ( graphError : any , statusCode : number ) : GraphError {
74+ private static constructErrorFromResponse ( graphError : GraphAPIErrorResponse , statusCode : number ) : GraphError {
6175 const error = graphError . error ;
6276 const gError = new GraphError ( statusCode , error . message ) ;
6377 gError . code = error . code ;
You can’t perform that action at this time.
0 commit comments