Skip to content
Sign upLog in

Why is this error occuring?

Profile icon

So I'm making this bot that stores its data in repl-db, but I'm not an expert in repl-db and now don't know why this error is occuring. The error is the picture below.

Screenshot from 2020-07-28 12-12-29

I have attached the repl, but place in the code where the error is occuring is below. The place where the error starts from is in line 78.

The error:

@client.command() async def prof(ctx): member1 = member = str(member1) if member in await db.all(): credits = str(await db.view(member)) title = "Coins" else: credits = "You don't have an account. Do hi!setaccount to make an account." title = ":pensive:" embed = make_embed(title=member, desc="") embed.add_field(name=title, value=credits) await ctx.send(embed=embed)

Can somebody help me?
Thanks in advance.

You are viewing a single comment. View All
Profile icon


A 400 means that the request was malformed. In other words, the data stream sent by the client to the server didn't follow the rules.

In the case of a REST API with a JSON payload, 400's are typically, and correctly I would say, used to indicate that the JSON is invalid in some way according to the API specification for the service.

By that logic, both the scenarios you provided should be 400's.

Imagine instead this was XML rather than JSON. In both cases, the XML would never pass schema validation--either because of an undefined element or an improper element value. That would be a bad request. Same deal here.
Hope this helps
Please mark my answer if this helps