Skip to content

v15.0.0

Choose a tag to compare

@kukjevov kukjevov released this 14 Apr 09:16

Features

  • new httpGatewayTimeoutInterceptor http interceptor function, which is used for intercepting http responses and handling 504 statuses
  • new httpServerErrorInterceptor http interceptor function, which is used for handling http server errors with codes 500..599 and displaying of internal server error
  • new noConnectionInterceptor http interceptor function, which is used for intercepting http responses and handling 0 statuses
  • new serviceUnavailableInterceptor http interceptor function, which is used for intercepting http responses and handling 503 statuses
  • new CatchHttpClientErrorHttpStatusCodeOptions interface, which represents options for cattch http client errors specific for http status code
    • properties
      • behavior behavior of catch http client error, default is CatchHttpClientErrorBehavior.Suppress
      • skipErrorNotifications indication whether skip displaying of notifications for errors
      • skipServerValidationErrors indication whether skip server validation errors processing
      • forceCustomMessageDisplay indication whether forcibly display custom message if present, not only as fallback but always
      • message object storing default messages to be displayed for specific http status codes
  • new HttpClientErrorConfigs type, that is object storing specific options/config according status code
  • new HTTP_CLIENT_ERROR_CONFIGS injection token, that contains custom configs for http client error handlers for specific http status codes
  • new provideHttpClientErrorConfigs provider, which provides http client error handlers and merges them with existing provided handlers
  • updated CatchHttpClientErrorOptions interface
    • new configs property, with specific options/config for http status codes
  • updated handleHttpClientErrors error handler
    • now use new configs property as priority for handling of errors
  • updated handleHttp404Error error handler
    • now use new configs property as priority for handling of errors
  • subpackage @anglr/error-handling/rest
    • updated RestCatchHttpClientError interface
      • new configs property, object storing options/config for specific http status codes
    • updated HttpClientErrorBehavior decorator
      • new parameter
        • statusCode if specified, behavior will be set for specific http status code
    • updated HttpClientErrorForceCustomMessage decorator
      • new parameter
        • statusCode if specified, force custom message display will be set for specific http status code
    • updated HttpClientErrorSkipErrorNotifications decorator
      • new parameter
        • statusCode if specified, skip error notifications will be set for specific http status code
    • updated HttpClientErrorSkipServerValidationErrors decorator
      • new parameter
        • statusCode if specified, skip server validation errors will be set for specific http status code

BREAKING CHANGES

  • removed handle4xxFunc error handler, use new ones
  • removed handle400WithValidationsFunc error handler, use new ones
  • removed handle404Func error handler, use new ones
  • removed handle4xxSuppress rxjs operator, use new ones
  • removed handle4xx rxjs operator, use new ones
  • removed handle400WithValidations rxjs operator, use new ones
  • removed handle404 rxjs operator, use new ones
  • removed handle404Suppress rxjs operator, use new ones
  • removed Handle4xxOptions interface, use new ones
  • removed XXXHttpClientError interface, use new ones
  • removed ClientValidationError class, use new ones
  • removed RestClientError class, use new ones
  • removed RestNotFoundError class, use new ones
  • removed HttpClientErrorCustomHandler type
  • removed HTTP_CLIENT_ERROR_MESSAGES injection token, functionality moved into HTTP_CLIENT_ERROR_CONFIGS
  • removed provideHttpClientErrorMessages provider, functionality moved into provideHttpClientErrorConfigs
  • updated CatchHttpClientErrorOptions interface
    • removed messages property, functionality moved into configs property
  • subpackage @anglr/error-handling/rest
    • removed ClientErrorHandlingBehavior enum
    • removed ClientErrorHandlingOptions class
    • removed getDefaultClientErrorObservable function
    • removed RestHttpClientErrors interface
    • removed CLIENT_ERROR_HANDLING_MIDDLEWARE_OPTIONS injection token
    • removed HTTP_CLIENT_ERROR_CUSTOM_HANDLER injection token
    • removed HTTP_IGNORED_CLIENT_ERRORS injection token, use one from base package
    • removed HttpClientErrorCustomHandlerDef type
    • removed getErrorHandlers function
    • removed ClientErrorHandlingMiddleware middleware
    • removed ErrorPassThrough decorator
    • removed ErrorPassThroughHttp decorator
    • removed Handle400WithValidations decorator
    • removed Handle404 decorator
    • removed IgnoreClientErrors decorator
    • removed SuppressError decorator
    • removed WithRestClientError decorator
    • updated RestCatchHttpClientError interface
      • removed messages property, functionality moved into configs property