Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit c6efd66

Browse files
dev/codeforces/ Добавил ошибки для работы с API
1 parent 7193466 commit c6efd66

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.cf.cfteam.exceptions.client;
2+
3+
public class ClientErrorException extends RuntimeException {
4+
5+
private final String code;
6+
7+
public ClientErrorException(String code) {
8+
super("server.error");
9+
this.code = code;
10+
}
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.cf.cfteam.exceptions.client;
2+
3+
import lombok.Getter;
4+
5+
@Getter
6+
public class ServerErrorException extends RuntimeException {
7+
8+
private final String code;
9+
10+
public ServerErrorException(String code) {
11+
super("server.error");
12+
this.code = code;
13+
}
14+
}

src/main/resources/codeforces.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
codeforces:
22
api:
33
base:
4-
url: https://codeforces.com/api/
4+
url: https://codeforces.com/api
5+
player:
6+
url: /user.info

0 commit comments

Comments
 (0)