我用的是SBCL,Emacs和Slime。此外,我正在使用库。
Dexador文档提供了一个如何处理失败HTTP请求的示例。
从官方文件中可以看出:
;; Handles 400 bad request
(handler-case (dex:get "http://lisp.org")
(dex:http-request-bad-request ()
;; Runs when 400 bad request returned
)
(dex:http-request-failed (e)
;; For other 4xx or 5xx
(f
我试图捕捉错误,但它不起作用,我总是看到Symfony异常页面,您在我的代码中看到错误了吗?提前谢谢。
namespace App\Controller;
use App\Entity\Product;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\
我正在尝试在我的电子应用程序中显示api调用的详细信息。和示例json数据:
[
{
ID: 596,
title: "Carolyn Wood",
content: "<p>Turning away bad clients can leave you feeling oddly guilty. They’re sort of like alcoholic or meth head cousins who force you, by their own bad behavior into denying them things
在openAPI 3.0中,我得到了以下错误:
Structural error at components.schemas.put_400.properties.errors
should NOT have additional properties
additionalProperty: readonly
Jump to line 1613
Structural error at components.schemas.patch_400.properties.errors
should NOT have additional properties
additionalProperty: s
我正在尝试使用Survey Monkey API的create 端点。它正在发回以下错误:
{
"error": {
"docs": "https://developer.surveymonkey.com/api/v3/#error-codes",
"message": "additional properties not defined by 'properties' are not allowed in field '_data'",
"id&
当我试图调用PIWIK API时,我得到了这个错误。
Bad Request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.
Cookie: piwik_visitor2=1%3DMjQ2NzVkZWQzNWE2NmVmZTg0MDAzYjcxNDVjMWNkYjM%3D%3A2%3....
我怎么才能摆脱这种情况。Piwik托管在我们的一台服务器上。与Apache配置有什么关系吗?
顺便说一句,它已经
当我的插件中的字段填充了大约5000个字符时,就会产生错误:
Bad Message 414
reason: URI Too Long
当我让它少一点的时候,它就会:
Bad Message 431
reason: Request Header Fields Too Large
config.jelly:
<f:entry field="field" title="Example">
<f:textarea value="${it.getField()}"/>
</f:entry>
java:
priva
我正在尝试发布到我自己制作的API中,并且我正在使用Postman进行测试。我得到了一个400 Bad Request error作为响应,消息为Invalid JSON message received。
这是一个使用GET将记录反馈给用户的示例。
{
"id":3,
"title":"Radio Etiquette Book",
"summary":"This book provides advice on how to present a radio programme with flair.
我是Mac10.9.5 OSX的用户,最近我用自制软件安装了pyenv。现在我在尝试使用pip时遇到了一个问题。键入pip list会产生以下错误:
-bash: /usr/local/bin/pip: @@HOMEBREW_PREFIX@@/opt/python/bin/python2.7:
bad interpreter: No such file or directory
有什么办法解决这个问题吗?
更新:我非常确定这与pip (以及easy_install)中的shebang行有关,但我不知道如何修复它。现在,它被设置为#!@@HOMEBREW_PREFIX@@/python/bin
我最近升级到Spring 2(因此也是Spring 2),并拥有最新的Arango java驱动程序和arango-spring数据版本(分别为5.0.1和3.1.1 )。
我现在在用java.lang.Object类型获取一个属性时遇到了问题
我知道这个错误
.... due to HttpClientErrorException: {"status":"BAD_REQUEST","timestamp":"2018-11-10 17:20:07","message":"Bad request. The s
突然,gdrive命令行工具停止工作,并总是给出以下错误消息:
Failed to get about: Get https://www.googleapis.com/drive/v3/about?alt=json&fields=maxImportSizes%2CmaxUploadSize%2CstorageQuota%2Cuser: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "invalid_grant",
"error_description
当将document保存到我的MongoDB database时出现错误时,我一直在尝试将消息send到浏览器。我使用Mongoose作为它的包装器。
这是我的signup.js
var mongoose = require('mongoose');
var models = mongoose.models;
exports.user = function(req, res){
var u = new models.Users(req.body);
u.save(function(err, user) {
if (err) {
在发布/创建新的API对象时,我试图定义要执行的自定义逻辑,但我正在接收错误:"<Appointment: apitest>" needs to have a value for field "appointment" before this many-to-many relationship can be used。
class AppointmentViewSet(viewsets.ModelViewSet):
queryset = Appointment.objects.all()
serializer_class = Appo
我有一个用户输入的网站。在用户输入某些内容之后,将根据输入查询API (JSON)。API查询不时失败,并输出查询URL。
file_get_contents(http://...id=...password=...&input=...): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /www/htdocs/....php
查询URL包含一个密码,这个密码当然是秘密的。如何防止页面输出失败的请求?
最佳本杰明
服务X宿主REST并支持服务Y。
客户端-> Y -> X
对于无效的JSON,服务Y用HTML错误进行响应(如下所示)。服务X对Y没有控制权。
<html>
<head><title>400 Bad Request</title></head>
<center><h1>400 Bad Request</h1></center>
</body>
</html>
对于所有其他类型的错误,X使用适当的HTTP响应代码和错误JSON (以下格式)进行
我有以下类,我正在尝试为它写一个规范:
module IntegrationError
class Error < StandardError; end
class BadRequest < IntegrationError::Error; end
class LogicProblem < IntegrationError::Error; end
def raise_logic_error!(message)
raise IntegrationError::LogicProblem, message
rescue => e
Rail
如何在nodejs中结束一个错误的请求。例如:
http.createServer((req, res) => {
//lets say a user sends a bad request
checkIfRequestIsGoodorBad()
//After finding out that the request is bad, how do i terminate it before it reaches doSomething()
doSomething()
}).listen()