2 * Copyright (c) 2010-2024 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.salus.internal.rest;
15 import java.io.Serial;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jetty.client.HttpResponseException;
21 * @author Martin GrzeĊlowski - Initial contribution
24 @SuppressWarnings("SerializableHasSerializationMethods")
25 public class HttpSalusApiException extends SalusApiException {
27 private static final long serialVersionUID = 1L;
28 private final int code;
29 private final String msg;
31 public HttpSalusApiException(int code, String msg, HttpResponseException e) {
32 super("HTTP Error %s: %s".formatted(code, msg), e);
37 public HttpSalusApiException(int code, String msg) {
38 super("HTTP Error %s: %s".formatted(code, msg));
43 public int getCode() {
47 public String getMsg() {