/*
 * Copyright © 2016 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package co.cask.cdap.api.common;

/**
 * CDAP HTTP Response Exception
 */
public interface HttpErrorStatusProvider {

  /**
   * Gives the HTTP status code for this exception if one needs to be returned. All exception classes which needs to
   * return a HTTP status code should override this.
   *
   * @return int which is the HTTP status code of this exceptions
   */
  int getStatusCode();

  /**
   * Gives the exception message. For sub-classes of {@link Exception} it will use {@link Exception#getMessage()}
   * unless overridden.
   *
   * @return exception message
   */
  String getMessage();
}

@@ -636,36 +636,95 @@
 %0A * 
-CDAP HTTP Response Exception
+Interface to be used by all error related classes which needs to provide a status code.
 %0A */
@@ -820,59 +820,17 @@
 is e
-xception if one needs to be returned. All exception
+rror. All
  cla
@@ -848,21 +848,16 @@
 needs to
-%0A   *
  return 
@@ -874,16 +874,34 @@
 tus code
+ for an error%0A   *
  should 
@@ -980,17 +980,12 @@
 is e
-xceptions
+rror
 %0A   
@@ -1037,128 +1037,20 @@
 he e
-xception message. For sub-classes of %7B@link Exception%7D it will use %7B@link Exception#getMessage()%7D%0A   * unless overridden
+rror message
 .%0A  
@@ -1070,16 +1070,12 @@
 rn e
-xception
+rror
  mes

remove exception